I have been fiddling around with Batman for the past few weeks, trying to get what I thought should work to work. I'm not quite there yet and would appreciate some help to progress this.
Summary:
I have 3 BT HomeHub 5 Type A, each with OpenWRT v18.06.4 and batman-adv openwrt-2018.1-8.
Node1 is the primary router for the home, this device is connected to my ISP via the wan interface, using ifname dsl0.101.
Nodes 2 and 3 should act as mesh access points only, using the 2.4 GHz radio (radio1).
I have the batman/ mesh interfaces set up and they appear to be working OK. The issue that I now have is that connectivity fails after the network cable is removed from nodes 3 and 4.
With the network cable in place, the device e.g. my mobile phone can connect to the SSID, gets an IP address from Node1 and traffic flows - I have internet access
If Nodes 2 or 3 have no network cable attached, then the mobile phone does not get an IP address from Node1 so internet connectivity fails. If I manually set an IP address and DNS on the mobile device, I still have no internet connectivity.
The DHCP service is only enabled on Node1.
The VLAN was set up using the following entry in the Wiki:
config interface 'vlan3333'
option type 'bridge'
option stp '1'
option ifname 'bat0.3333'
option proto 'none'
option auto '1'
option delegate '0'
Looking at other forum entries discussing bridging I'm thinking that this bridge is not complete as it only references one interface (bat0.3333). I tried adding radio1 to the ifname option, but that had no effect. I've also seen references to adding the bat interface to the lan interface on node1.
If I connect to node2 directly, using a network cable and forcing my PC to go to it direct, I can see that the route table just pushes everything through the br-lan bridge. Looking at this forum entry: Batman-adv Mesh network it suggests that there is no need to manually set routes up - batman should handle that itself.
As you can see, I'm kind of confused and don't know where to go from here, so I'd really appreciate some help in progressing this. I'm pondering if I am totally missing the point and simply have got the wrong end of the stick (in terms of my understanding). Although I can see that the batman interfaces are 'there', I have a sneaky feeling that I'm not really running a batman mesh when the network cables are in place. My interpretation of using a mesh was that the mesh nodes should be separately placed within the home, not connected to the home LAN via a cable and that devices should be able to connect to the node (2 or 3) either wirelessly (SSID) or via cable and that all traffic should be routed back to node1. My background is technical, but not very network focused.
My previous post showed I was using the wrong configuration for the batman version installed. I flipped to use the old style configuration just to 'get on' to prove that this can be done/ learn the set up etc. TBH, looking at the upgrade paths for updating batman alone, I got a little confused, so planned to come back to that after I had batman working. I assume that the snapshot update bin file would have the latest version of batman? https://downloads.openwrt.org/snapshots/targets/lantiq/xrx200/openwrt-lantiq-xrx200-bt_homehub-v5a-squashfs-sysupgrade.bin
Thanks in advance,
Jon
Some outputs:
batctl n:
Node1
[B.A.T.M.A.N. adv openwrt-2018.1-8, MainIF/MAC: mesh0/44:e9:dd:6b:05:68 (bat0/fe:cd:3b:83:ec:a5 BATMAN_IV)]
IF Neighbor last-seen
mesh0 18:62:2c:52:7c:ee 0.516s
mesh0 54:64:d9:29:a3:ac 0.428s
Node2
[B.A.T.M.A.N. adv openwrt-2018.1-8, MainIF/MAC: mesh0/54:64:d9:29:a3:ac (bat0/6e:42:9e:83:4a:cf BATMAN_IV)]
IF Neighbor last-seen
mesh0 18:62:2c:52:7c:ee 0.276s
mesh0 44:e9:dd:6b:05:68 0.100s
Node3
[B.A.T.M.A.N. adv openwrt-2018.1-8, MainIF/MAC: mesh0/18:62:2c:52:7c:ee (bat0/3e:dc:ba:e9:15:fb BATMAN_IV)]
IF Neighbor last-seen
mesh0 44:e9:dd:6b:05:68 0.064s
mesh0 54:64:d9:29:a3:ac 0.040s
/etc/config/network
Node1
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd6e:c86e:646a::/48'
config dsl 'dsl'
option xfer_mode 'ptm'
option annex 'b'
option tone 'a'
option ds_snr_offset '0'
option line_mode 'vdsl'
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config device 'lan_dev'
option name 'eth0.1'
option macaddr '44:e9:dd:6b:05:66'
config interface 'wan'
option proto 'pppoe'
option ipv6 '1'
option ifname 'dsl0.101'
option password 'BT'
option username 'bthomehub@btinternet.com'
option peerdns '0'
option dns '208.67.222.222 208.67.220.123'
config device 'wan_dev'
option macaddr '44:e9:dd:6b:05:67'
option name 'dsl0'
config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 4 6t'
option vid '1'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '5 6t'
option vid '2'
config interface 'nwi_mesh0'
option ifname 'mesh0'
option proto 'batadv'
option mesh 'bat0'
option mtu '2304'
config interface 'vlan3333'
option type 'bridge'
option stp '1'
option ifname 'bat0.3333 eth0.1' #Note eth0.1 added here based on other wiki info.
option proto 'none'
option auto '1'
option delegate '0'
Nodes 2 & 3
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fde5:97e0:596b::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.1.11' #Node3's IP is 192.168.1.12, apart from that, they are the same.
config device 'lan_dev'
option name 'eth0.1'
option macaddr '54:64:d9:29:a3:aa'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 4 6t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '5 6t'
config interface 'nwi_mesh0'
option ifname 'mesh0'
option proto 'batadv'
option mesh 'bat0'
option mtu '2304'
config interface 'vlan3333'
option type 'bridge'
option stp '1'
option proto 'none'
option auto '1'
option delegate '0'
option ifname 'bat0.3333'
/etc/config/wireless
Node1 - both radios are active, radio0 - 5GHz advertising BTHub5-5GHZ SSID, radio1 - 2.4GHZ advertising BTHub-SH6K SSID and being used for mesh.
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11a'
option path 'pci0000:01/0000:01:00.0/0000:02:00.0'
option htmode 'VHT80'
option country 'GB'
option legacy_rates '1'
option channel 'auto'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option encryption 'psk2+ccmp'
option key 'MyPassword'
option wpa_disable_eapol_key_retries '1'
option ssid 'BTHub5-5GHZ'
config wifi-device 'radio1'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'pci0000:00/0000:00:0e.0'
option htmode 'HT20'
option country 'GB'
option legacy_rates '1'
option __toggle 'Enable'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'BTHub-SH6K'
option encryption 'psk2+tkip+ccmp'
option key 'MyPassword'
option wpa_disable_eapol_key_retries '1'
config wifi-iface 'mesh0'
option device 'radio1'
option ifname 'mesh0'
option network 'nwi_mesh0'
option mode 'mesh'
option mesh_fwding '0'
option mesh_id 'MyMesh'
option encryption 'psk2+ccmp'
option key 'MyPassword'
Node 2 and 3: radio0 is disabled, radio1 is used to advertise an access point SSID (node2 & node3 - per device) and for mesh (same on each).
config wifi-device 'radio0'
option type 'mac80211'
option channel '36'
option hwmode '11a'
option path 'pci0000:01/0000:01:00.0/0000:02:00.0'
option htmode 'VHT80'
option disabled '1'
config wifi-iface 'default_radio0'
option device 'radio0'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
option disabled '1'
option network 'lan'
config wifi-device 'radio1'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'pci0000:00/0000:00:0e.0'
option htmode 'HT20'
config wifi-iface 'default_radio1'
option device 'radio1'
option mode 'ap'
option ssid 'node2' #node3 on Node3
option encryption 'psk2+tkip+ccmp'
option key 'a63954f594'
option wpa_disable_eapol_key_retries '1'
option network 'lan'
config wifi-iface 'mesh0'
option device 'radio1'
option ifname 'mesh0'
option network 'nwi_mesh0'
option mode 'mesh'
option mesh_fwding '0'
option mesh_id 'MyMesh'
option encryption 'psk2+ccmp'
option key 'MyPassword'