Skip to contentSkip to conversation

Problem with multi-radio, multi-channel in batman-adv

B.A.T.M.A.N. puyou.lu 3 participants 5 messages Apr 16, 2012 – Apr 18, 2012

lore
Share & tools
lore

puyou.lu

author
#0 lore raw

Hi guys.
  I’m trying to make a for nodes WMN using four devices with two wireless cards each. I would like to use three different channels to reduce the interference, like this:
  [Node A] <- channel 1 -> [Node B] <- channel 2 -> [Node C] <- channel 3 -> [Node D]
  First I configure eight wireless cards to the specific channel in ad-hoc mode using “iw dev wlan0 ibss join …”.
  Then, I think I should add wlan0 and wlan1 to the same batman-adv interface (that is bat0) in every device. So I need to configure four nodes with the same commands like:
   echo bat0 > /sys/class/net/wlan0/batman_adv/mesh_iface
   echo bat0 > /sys/class/net/wlan1/batman_adv/mesh_iface
  Last configure an IP address to each bat0. (Node A-10.0.0.1, Node B-10.0.0.2, Node C-10.0.0.3, Node D-10.0.0.4).
  But it seem Node A can reach Node B and Node C(using ping), but can’t for Node D.

  Am I following the right procedure?
  Sorry for my poor English. Any help would be appreciated.

Puyou Lu.

#1 lore raw

Hey Puyou,

Quoted 4 lines · puyou.lu

Hi guys.
  I’m trying to make a for nodes WMN using four devices with two wireless cards each. I would like to use three different channels to reduce the interference, like this:
  [Node A] <- channel 1 -> [Node B] <- channel 2 -> [Node C] <- channel 3 -> [Node D]
  First I configure eight wireless cards to the specific channel in ad-hoc mode using “iw dev wlan0 ibss join …”.

Quoted 8 lines

  Then, I think I should add wlan0 and wlan1 to the same batman-adv interface (that is bat0) in every device. So I need to configure four nodes with the same commands like:
   echo bat0 > /sys/class/net/wlan0/batman_adv/mesh_iface
   echo bat0 > /sys/class/net/wlan1/batman_adv/mesh_iface
  Last configure an IP address to each bat0. (Node A-10.0.0.1, Node B-10.0.0.2, Node C-10.0.0.3, Node D-10.0.0.4).
  But it seem Node A can reach Node B and Node C(using ping), but can’t for Node D.

  Am I following the right procedure?
  Sorry for my poor English. Any help would be appreciated.

The procedure looks right in general. A few questions to debug:

* do you use different ESSIDs for the IBSS-networks? ad-hoc devices joining may override the configured channel and select another IBSS-network instead when it has the same ESSID.
* have you confirmed that the WiFi connection works without batman-adv? just set up your WiFi, configure different IP addresses and ping for each hop to test.
* does the output of "batctl originators" helps you? Are the other nodes displayed on node 4?

Cheers,
Simon

author
#2 lore raw

Hi Simon,
I have tried again, and I think the problem is caused by the same ESSID, as you said. I used the same ESSID on every wireless cards of every nodes.When I use different ESSIDs in different channel, the problem seems diappeared.

Another question, does the two wireless cards(wlan0 and wlan1) of one node have any differences in receiving and forwarding unicast and broadcast package? Can a gw_client node get IP address from a dhcp server from both wireless cards?

Quoted 46 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Simon Wunderlich
Sent: Tuesday, April 17, 2012 5:26 PM
To: The list for a Better Approach To Mobile Ad-hoc Networking
Subject: Re: [B.A.T.M.A.N.] Problem with multi-radio, multi-channel in batman-adv

Hey Puyou,

Quoted 2 lines · puyou.lu

Hi guys.
  I’m trying to make a for nodes WMN using four devices with two wireless

cards each. I would like to use three different channels to reduce the interference, like this:

Quoted 1 line

  [Node A] <- channel 1 -> [Node B] <- channel 2 -> [Node C] <-

channel 3 -> [Node D]

Quoted 1 line

  First I configure eight wireless cards to the specific channel in ad-hoc

mode using “iw dev wlan0 ibss join …”.

Quoted 1 line

  Then, I think I should add wlan0 and wlan1 to the same batman-adv

interface (that is bat0) in every device. So I need to configure four nodes with the same commands like:

Quoted 3 lines

   echo bat0 > /sys/class/net/wlan0/batman_adv/mesh_iface echo bat0 > /sys/class/net/wlan1/batman_adv/mesh_iface Last configure an IP address to each bat0. (Node A-10.0.0.1, Node

B-10.0.0.2, Node C-10.0.0.3, Node D-10.0.0.4).

Quoted 1 line

  But it seem Node A can reach Node B and Node C(using ping), but can’

t for Node D.

Quoted 3 lines

  Am I following the right procedure?
  Sorry for my poor English. Any help would be appreciated.

The procedure looks right in general. A few questions to debug:

* do you use different ESSIDs for the IBSS-networks? ad-hoc devices joining
may override the configured channel
and select another IBSS-network instead when it has the same ESSID.
* have you confirmed that the WiFi connection works without batman-adv? just
set up your WiFi, configure different
IP addresses and ping for each hop to test.
* does the output of "batctl originators" helps you? Are the other nodes
displayed on node 4?

Cheers,
Simon

#3 lore raw

Hi Puyou,

Quoted 4 lines · puyou.lu

Hi Simon,
I have tried again, and I think the problem is caused by the same ESSID, as you said. I used the same ESSID on every wireless cards of every nodes.When I use different ESSIDs in different channel, the problem seems diappeared.

Another question, does the two wireless cards(wlan0 and wlan1) of one node have any differences in receiving and forwarding unicast and broadcast package? Can a gw_client node get IP address from a dhcp server from both wireless cards?

Yes, you use the virtual bat0 interface. Whether the data is transported via wlan0 or wlan1 does not matter, you will always receive the data on bat0.

There is no difference in the usage, and which interface is used is up to batman-adv to decide. Please make sure that you configure all your services like IP addresses, DHCP, etc on bat0 (or even on bridges above it), not the wlanX interfaces.

http://www.open-mesh.org/wiki/batman-adv/Quick-start-guide

Cheers,
Simon

Quoted 49 lines
Quoted 47 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Simon Wunderlich
Sent: Tuesday, April 17, 2012 5:26 PM
To: The list for a Better Approach To Mobile Ad-hoc Networking
Subject: Re: [B.A.T.M.A.N.] Problem with multi-radio, multi-channel in batman-adv

Hey Puyou,

Quoted 2 lines · puyou.lu

Hi guys.
  I’m trying to make a for nodes WMN using four devices with two wireless

cards each. I would like to use three different channels to reduce the interference, like this:

Quoted 1 line

  [Node A] <- channel 1 -> [Node B] <- channel 2 -> [Node C] <-

channel 3 -> [Node D]

Quoted 1 line

  First I configure eight wireless cards to the specific channel in ad-hoc

mode using “iw dev wlan0 ibss join …”.

Quoted 1 line

  Then, I think I should add wlan0 and wlan1 to the same batman-adv

interface (that is bat0) in every device. So I need to configure four nodes with the same commands like:

Quoted 3 lines

   echo bat0 > /sys/class/net/wlan0/batman_adv/mesh_iface echo bat0 > /sys/class/net/wlan1/batman_adv/mesh_iface Last configure an IP address to each bat0. (Node A-10.0.0.1, Node

B-10.0.0.2, Node C-10.0.0.3, Node D-10.0.0.4).

Quoted 1 line

  But it seem Node A can reach Node B and Node C(using ping), but can’

t for Node D.

Quoted 3 lines

  Am I following the right procedure?
  Sorry for my poor English. Any help would be appreciated.

The procedure looks right in general. A few questions to debug:

* do you use different ESSIDs for the IBSS-networks? ad-hoc devices joining
may override the configured channel
and select another IBSS-network instead when it has the same ESSID.
* have you confirmed that the WiFi connection works without batman-adv? just
set up your WiFi, configure different
IP addresses and ping for each hop to test.
* does the output of "batctl originators" helps you? Are the other nodes
displayed on node 4?

Cheers,
Simon

#4 lore raw
In reply to puyou.lu

Hi!
I guess you're planning a two.radio mesh to improve troughput. I recently went trough a similar experience and learnt thanks to this list, turns out, this might sound counterintuitive at first, but in some setups, using just 2 channels, spaced further apart, will avoid interference better than 3 ('almost') overlapping channels. I.e. Using channel 1 and 11 works better than 1 and 6.

I'm assuming you're not using 5.8g , etc

I suggest you to check a thread on this list last month archives, 'bandwidth degradation on p2p links', there are some interesting references to read on the subject.

Quoted 25 lines · puyou.lu

Hi guys.
  I’m trying to make a for nodes WMN using four devices with two wireless cards each. I would like to use three different channels to reduce the interference, like this:
  [Node A] <- channel 1 -> [Node B] <- channel 2 -> [Node C] <- channel 3 -> [Node D]
  First I configure eight wireless cards to the specific channel in ad-hoc mode using “iw dev wlan0 ibss join …”.
  Then, I think I should add wlan0 and wlan1 to the same batman-adv interface (that is bat0) in every device. So I need to configure four nodes with the same commands like:
   echo bat0 > /sys/class/net/wlan0/batman_adv/mesh_iface echo bat0 > /sys/class/net/wlan1/batman_adv/mesh_iface Last configure an IP address to each bat0. (Node A-10.0.0.1, Node B-10.0.0.2, Node C-10.0.0.3, Node D-10.0.0.4).
  But it seem Node A can reach Node B and Node C(using ping), but can’t for Node D.

  Am I following the right procedure?
  Sorry for my poor English. Any help would be appreciated.

Puyou Lu.