如何在batman-adv中解决节点间的IP问题?

时间:2019-03-23 14:55:13

标签: arduino-yun

您好,我试图在两台arduino yun V2设备上使用batman adv,如我所述:

https://openwrt.org/docs/guide-user/network/wifi/mesh/batman http://www.radiusdesk.com/old_wiki/technical_discussions/batman_basic

在所有这些上都配置了所有这些之后,我将以太网电缆连接到node1并创建具有WAN的网桥LAN以从电缆(WAN)获得Internet。我也禁用了局域网的dhcp服务器,以便我从节点1获得的以太网(wan:router存在于另一侧)中获取IP地址。但是节点2我可以使用batctl ping ping(通过网状网络上的mac ping),但无法通过node1从路由器获取ip。可能是什么问题? 如何配置,以便node2也可以通过与节点1的连接从路由器获取ip地址?

节点1

/ etc / config / wireless

配置wifi设备'radio0'

  option type 'mac80211'
  option channel '11'
  option hwmode '11g'
  option path 'platform/ar933x_wmac'
  option htmode 'HT40'
  option txpower '18'

配置wifi-iface

  option device 'radio0'
  option mode 'ap'
  option encryption 'none'
  option ssid 'arduino1'
  option network 'lan wan'

配置wifi-iface'wmesh'

  option device 'radio0'
  option ifname 'adhoc0'
  option network 'mesh'
  option mode 'adhoc'
  option ssid 'mesh'
  option bssid '02:CA:FE:CA:CA:40'

/ etc / config / network

配置界面“环回”

   option ifname 'lo'
   option proto 'static'
   option ipaddr '127.0.0.1'
   option netmask '255.0.0.0'

config globals'globals'

   option ula_prefix 'fd3c:e0d9:3614::/48'

配置界面'lan'

   option type 'bridge'
   option force_link '1'
   option proto 'static'
   option netmask '255.255.255.0'
   option ip6assign '60'
   option _orig_ifname 'wlan0 bat0'
   option ipaddr '192.168.100.25'

配置界面“网格”

   option ifname 'adhoc0'
   option mtu '1532'
   option proto 'batadv'
   option mesh 'bat0'

配置界面'wan'

   option proto 'dhcp'
   option _orig_ifname 'eth1'
   option _orig_bridge 'false'
   option macaddr 'A8:40:41:11:EB:AC'
   option ifname 'eth1'

node2

/ etc / config / wireless

配置wifi设备'radio0'

option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/ar933x_wmac'
option htmode 'HT40'
option txpower '18'

配置wifi-iface

 option device 'radio0'
 option mode 'ap'
 option encryption 'none'
 option ssid 'Arduino2'
 option network 'mb'

配置wifi-iface'wmesh'

  option device 'radio0'
  option ifname 'adhoc0'
  option network 'mesh'
  option mode 'adhoc'
  option ssid 'mesh'
  option bssid '02:CA:FE:CA:CA:40'

/ etc / config / network

配置界面“环回”

   option ifname 'lo'
   option proto 'static'
   option ipaddr '127.0.0.1'
   option netmask '255.0.0.0'

config globals'globals'

    option ula_prefix 'fd3c:e0d9:3614::/48'

配置界面'lan'

      option type 'bridge'
      option force_link '1'
      option proto 'static'
      option netmask '255.255.255.0'
      option ip6assign '60'
      option _orig_ifname 'wlan0'
      option ipaddr '192.168.100.6'

配置界面“网格”

     option ifname 'adhoc0'
     option mtu '1532'
     option proto 'batadv'
     option mesh 'bat0'

配置界面“ mb”

    option ifname 'bat0'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.100.26'
    option netmask '255.255.255.0'

配置界面'wan'

    option proto 'dhcp'
    option _orig_ifname 'eth1'
    option _orig_bridge 'false'
    option macaddr 'A8:40:41:12:27:88'
    option ifname 'eth1'

1 个答案:

答案 0 :(得分:0)

在/ etc / config / wireless

删除

option _orig_ifname 'wlan0 bat0'

类型

option ifname 'eth0 bat0' (for node 1. Remember bat0 only for node 1)

option ifname 'eth0' (for node 2)

在/ etc / config / network

在节点2的不同子网中使接口“ lan”和“ mb”的ipaddr (由于node1的ipaddr为192.168.100.25,所以节点mb中接口mb的ip addr将位于同一子网192.168.100.X中,而lan接口的ipaddr应位于不同的子网192.168.A(除100外的任何子网)。其他节点的处理。