LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   OpenWRT Adhoc / mesh network not working (with and without batman-adv) (https://www.linuxquestions.org/questions/linux-networking-3/openwrt-adhoc-mesh-network-not-working-with-and-without-batman-adv-4175735454/)

dark0707 03-29-2024 10:18 AM

OpenWRT Adhoc / mesh network not working (with and without batman-adv)
 
I am trying to setup a set of computers to connect over an ad-hoc network, or mesh (on top of adhoc) using batman-adv.

The adhoc network is able to establish a station, but I can't ping one computer from another.

When using batman-adv to create a mesh on top of the adhoc network, the bat0 device never seems to have any traffic.

Here is the setup for two computers:

Code:

Computer 1:
-----------------------------------------------------------------------------------------
# /etc/config/wireless
config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/ahb/18100000.wmac'
        option channel '5'
        option band '2g'
        option htmode 'HT20'
        option cell_density '0'
        option hwmode '11n'

config wifi-iface 'wifinet0'
        option device 'radio0'
        option network 'bat0'
        option mode 'adhoc'
        option ssid 'spiri-mesh'
        option bssid '02:CA:FF:EE:BA:BE'
        option mcast_rate '12000'

# /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 'fd6b:8d01:7c47::/48'

config interface 'lan'
        option proto 'static'
        option ipaddr '192.168.1.2'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        option device 'br-lan'

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

config interface 'bat0'
        option proto 'batadv'
        option routing_algo 'BATMAN_IV'
        option aggregated_ogms '1'
        option ap_isolation '0'
        option bonding '0'
        option fragmentation '1'
        option gw_mode 'off'
        option log_level '0'
        option orig_interval '1000'
        option bridge_loop_avoidance '1'
        option distributed_arp_table '1'
        option multicast_mode '1'

config interface 'mesh'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'
        option device 'bat0'

config device
        option name 'bat0'
        option ipv6 '0'
-----------------------------------------------------------------------------------------

Code:

Computer 2:
-----------------------------------------------------------------------------------------
# /etc/config/wireless
config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/ahb/18100000.wmac'
        option channel '5'
        option band '2g'
        option htmode 'HT20'
        option cell_density '0'
        option hwmode '11n'

config wifi-iface 'wifinet0'
        option device 'radio0'
        option network 'bat0'
        option mode 'adhoc'
        option ssid 'spiri-mesh'
        option bssid '02:CA:FF:EE:BA:BE'
        option mcast_rate '12000'

# /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 'fd6b:8d01:7c47::/48'

config interface 'lan'
        option proto 'static'
        option ipaddr '192.168.1.3'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        option device 'br-lan'

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

config interface 'bat0'
        option proto 'batadv'
        option routing_algo 'BATMAN_IV'
        option aggregated_ogms '1'
        option ap_isolation '0'
        option bonding '0'
        option fragmentation '1'
        option gw_mode 'off'
        option log_level '0'
        option orig_interval '1000'
        option bridge_loop_avoidance '1'
        option distributed_arp_table '1'
        option multicast_mode '1'

config interface 'mesh'
        option proto 'static'
        option ipaddr '192.168.2.2'
        option netmask '255.255.255.0'
        option device 'bat0'

config device
        option name 'bat0'
        option ipv6 '0'
-----------------------------------------------------------------------------------------


After setting up the config, I am using the following to start services:
Code:

# Load batman-adv module
modprobe batman-adv

# Replace phy0-ibss0 with your wireless interface name (use 'iw dev' to find it)
batctl if add phy0-ibss0

Activate the interfaces
ifconfig phy0-ibss0 up
ifconfig bat0 up

Assign IP address to bat0 interface (use different IPs for each device)
ifconfig bat0 192.168.2. netmask 255.255.255.0 # Use 192.168.2.2 for the other device

What is going wrong here?


All times are GMT -5. The time now is 01:52 AM.