B.A.T.M.A.N-adv mesh: Access Point on mesh node has no internet

Hello

I am trying to build a mesh network of Raspberry Pis (RPi) based on OpenWRT 21.02.0 using batman-adv.

There is one main gateway based on a RPi 3B+ that connects to the internet via Ethernet. It then sets up an AP via a WLAN dongle acts as a mesh point. The also builds a local network by providing a dhcp server for the other nodes.
The mesh nodes are based on an RPi Zero. They also create a mesh point and an AP. An android device (e.g. a tablet) should now be able to connect to any AP, get a local IP from the gateway and access the internet.

If I connect to an AP on a node, I am successfully connected to the network. However, I have no internet access.

The mesh nodes find themselves using batctl n and can ping each other using batctl p <mac>.

I problably have a lot of other problems in my config. At some point, the whole bridging this into that and interfacing this interface with another interface simply started to elude me... sorry.

Configuration files for the main gateway:

/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 'fd92:ce58:085f::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'dhcp'

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 'off'
        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 throughput_override '0'

config interface 'lan_bat0'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.10.1'
        option netmask '255.255.255.0'
        list dns '8.8.8.8'
        option ifname 'bat0 lan'

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode 'VHT80'
        option cell_density '0'
        option disabled '1'

config wifi-iface 'wmesh'
        option device 'radio1'
        option ifname 'if-mesh'
        option network 'mesh'
        option mode 'mesh'
        option mesh_id 'MeshCloud'
        option encryption 'none'
        option mesh_fwding '0'
        option mesh_ttl '1'
        option mcast_rate '24000'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0'
        option htmode 'HT20'
        option cell_density '0'

config wifi-iface 'wifinet1'
        option device 'radio1'
        option mode 'ap'
        option ssid 'OpenWrtAP_3B'
        option encryption 'psk2'
        option key 'foobar'
        option ieee80211r '1'
        option ft_over_ds '1'
        option ft_psk_generate_local '1'
        option network 'lan_bat0'

Configuration files for the mesh client:

/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 'fd92:ce58:085f::/48'

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 'off'
        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 throughput_override '0'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.10.11'
        option netmask '255.255.255.0'
		option gateway '192.168.10.11'
        option dns '8.8.8.8'

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode 'VHT80'
        option cell_density '0'
        option disabled '0'

config wifi-iface 'wmesh'
        option device 'radio1'
        option ifname 'if-mesh'
        option network 'mesh'
        option mode 'mesh'
        option mesh_id 'MeshCloud'
        option encryption 'none'
        option mesh_fwding '0'
        option mesh_ttl '1'
        option mcast_rate '24000'

config wifi-iface 'meshap'
        option device 'radio0'
        option mode 'ap'
        option ssid 'OpenWrtAP'
        option encryption 'psk'
        option key 'foobar'
        option network 'lan'

Thanks in advance

I think, i got it largely working now. The main gateway doesn't yet provide a DHCP-Server for the clients. Instead, the clients are connected to whatever infrastructure is plugged into the main gateway's ethernet port (which is the main function of a gateway after all). I can connect to an AP on a node and connect to the internet.

Configuration files for the main gateway:

/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 'fd92:ce58:085f::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0 bat0'
        option proto 'dhcp'
        option device 'br-lan'

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 'off'
        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 throughput_override '0'

config interface 'lan_bat0'
        option proto 'static'
        option ipaddr '192.168.10.1'
        option netmask '255.255.255.0'
        list dns '8.8.8.8'
		
config device
        option name 'br-lan_bat0'
        option type 'bridge'
        list ports 'bat0'
        list ports 'eth0'

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'platform/soc/3f300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option htmode 'VHT80'
        option cell_density '0'
        option disabled '1'

config wifi-iface 'wmesh'
        option device 'radio1'
        option ifname 'if-mesh'
        option mode 'mesh'
        option mesh_id 'MeshCloud'
        option encryption 'none'
        option mesh_fwding '0'
        option mesh_ttl '1'
        option mcast_rate '24000'
        option mesh_rssi_threshold '0'
        option network 'mesh'

config wifi-iface 'wifinet1'
        option device 'radio1'
        option mode 'ap'
        option ssid 'OpenWrtAP_3B'
        option encryption 'psk2'
        option key 'supportgis'
        option ieee80211r '1'
        option ft_over_ds '1'
        option ft_psk_generate_local '1'
        option network 'lan_bat0'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0'
        option htmode 'HT20'
        option disabled '0'

Configuration files for the mesh client:

/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 'fd92:ce58:085f::/48'

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 'off'
        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 throughput_override '0'

config interface 'ap_if'
        option type 'bridge'
        option proto 'dhcp'
        option ifname 'bat0'
        option auto '1'
		option delegate '0'
        option stp '1'

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option htmode 'HT20'
        option disabled '0'

config wifi-iface 'if-mesh'
        option device 'radio1'
        option ifname 'if-mesh'
        option network 'mesh'
        option mode 'mesh'
        option mesh_id 'MeshCloud'
        option encryption 'none'
        option mesh_fwding '0'
        option mesh_ttl '1'
        option mcast_rate '24000'

config wifi-iface 'ap_iface'
        option device 'radio0'
	option ifname 'ap_iface'
        option mode 'ap'
        option ssid 'OpenWrtAP'
        option encryption 'psk2'
        option key 'foobar'
        option network 'ap-if'

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