b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
@ 2016-10-03 14:14 Kaushik N P
  2016-10-03 17:08 ` leftbydefault
  2016-10-06  1:28 ` Marek Lindner
  0 siblings, 2 replies; 14+ messages in thread
From: Kaushik N P @ 2016-10-03 14:14 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hello,

I have recently decided to take up the prospect of layer 2 Batman adv
protocol as my area of interest, and want to implement a mesh bed to
get some statistical readings of my own (am very new to this area, so
ask for forgiveness beforehand if I was supposed to provide more
info). The plan was to set up OpenWRT in qemu in laptops and work on
them with batman adv. But, unfortunately, I have been facing some
problems in setting the system up. I have followed (as much as I
could) the steps as per documentation (links for them posted below).

Links:

https://wiki.openwrt.org/doc/howto/qemu (Setting up qemu - problem I
face in this is of which commands I should run , and which of the
systems are viable for me (like QEMU arm, arm 64, x86-64,etc) to work
on a 64-bit laptop having Linux OS )
https://www.open-mesh.org/projects/open-mesh/wiki/Emulation (I am not
sure if my qemu is set up properly for there is no confirmation
methods that are provided to me to check if its working properly)


What I hope to find is:-

Another documentation maybe for setting up, or confirmation for
setting up (because I can't tell sometimes if the instructions have
been followed correctly).
Clarification for my doubt regarding the different types of OpenWRT
images (like Kamikaze, Chaos Calmer, Attitude Adjustment,etc), what do
they do and which one I should use for working with standard Batman
adv setup.
Confirmation method to see if qemu having OpenWRT is setup in my
system - as now I have a setup in terminal which says

BusyBox v1.24.2 () built-in shell (ash)

//Says OpenWrt below
  _______                     ________        __
 |            | .-----.-----.-----.|  |  |  |.----.|  |_
 |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
 |_______| |  __|____|__|__||________||__|  |____|
                |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 DESIGNATED DRIVER (Bleeding Edge, 49928)
 -----------------------------------------------------
  * 2 oz. Orange Juice         Combine all juices in a
  * 2 oz. Pineapple Juice      tall glass filled with
  * 2 oz. Grapefruit Juice     ice, stir well.
  * 2 oz. Cranberry Juice
 -----------------------------------------------------
root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
identified at 0xf0b40000, IRQ: 60
[   13.934741] device eth0 entered promiscuous mode
[   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   15.762764] br-lan: port 1(eth0) entered forwarding state
[   15.764526] br-lan: port 1(eth0) entered forwarding state
[   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   17.762480] br-lan: port 1(eth0) entered forwarding state
root@OpenWrt:/#


I have more doubts, but hopefully, I will get some answers to them
from the above questions itself.
Hope to hear soon!!!

Thanks and Regards,

Kaushik NP
LI | Tw | FB
SAP Ambassador,
General Secretary, Computer Society
Team IEEE UVCE,
3rd Year Undergraduate Student,
University Visvesvaraya College of Engineering,
Bangalore, IN

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
  2016-10-03 14:14 [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv Kaushik N P
@ 2016-10-03 17:08 ` leftbydefault
  2016-10-04 10:11   ` Kaushik N P
  2016-10-06  1:28 ` Marek Lindner
  1 sibling, 1 reply; 14+ messages in thread
From: leftbydefault @ 2016-10-03 17:08 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Hello Kaushik

On 2016-10-03 19:44, Kaushik N P wrote:
> Hello,
> 
> What I hope to find is:-
> 
> Another documentation maybe for setting up, or confirmation for
> setting up (because I can't tell sometimes if the instructions have
> been followed correctly).

I have no experience in simulating or emulating batman-adv, but I have 
experience
in compiling openwrt from source along with batman-adv and batctl. I can 
help you with that. batman-adv is built as a kernel module and so it is 
included by default in Linux kernels >= 2.x. You have mentioned that you 
are using Linux based operating system, I hope by now, you should be 
running Linux kernel 4.x. If you want to play around with batman-adv for 
sometime before emulating, you can use two three Linux based laptops 
with WiFi interface cards that support IBSS (adhoc mode).

You can check that using

     iw list | grep IBSS

if the command returned something like
Device supports RSN-IBSS.
		 * IBSS

then your Wireless NIC can be switched to ad-hoc mode. We have a bash 
shell script that does it automatically for you. You can find the script 
and terminal cast in the following links.

  1. https://github.com/PYMeshnet/scripts
  2. https://asciinema.org/a/38575

> Clarification for my doubt regarding the different types of OpenWRT
> images (like Kamikaze, Chaos Calmer, Attitude Adjustment,etc), what do
> they do and which one I should use for working with standard Batman
> adv setup.

Chaos Calmer (15.x) is the recent stable release of OpenWRT firmware. 
'Kamikaze, Altitude Adjustment, etc.,' are just different names given to 
different versions of OpenWRT releases. OpenWRT are meant to be the 
operating system for routers and modems. Depending on the configuration 
of devices, some versions may be supported and some may not be supported 
on certain routers and modems.

Since you are trying to create a virtual environment, I think should go 
with Chaos Calmer. (again I have no experience either with creating a 
virtual environment for OpenWRT nor for batman-adv).

> Confirmation method to see if qemu having OpenWRT is setup in my
> system - as now I have a setup in terminal which says
> 
> BusyBox v1.24.2 () built-in shell (ash)
> 
> //Says OpenWrt below
>   _______                     ________        __
>  |            | .-----.-----.-----.|  |  |  |.----.|  |_
>  |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
>  |_______| |  __|____|__|__||________||__|  |____|
>                 |__| W I R E L E S S   F R E E D O M
>  -----------------------------------------------------
>  DESIGNATED DRIVER (Bleeding Edge, 49928)
>  -----------------------------------------------------
>   * 2 oz. Orange Juice         Combine all juices in a
>   * 2 oz. Pineapple Juice      tall glass filled with
>   * 2 oz. Grapefruit Juice     ice, stir well.
>   * 2 oz. Cranberry Juice
>  -----------------------------------------------------
> root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
> identified at 0xf0b40000, IRQ: 60
> [   13.934741] device eth0 entered promiscuous mode
> [   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
> [   15.762764] br-lan: port 1(eth0) entered forwarding state
> [   15.764526] br-lan: port 1(eth0) entered forwarding state
> [   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes 
> ready
> [   17.762480] br-lan: port 1(eth0) entered forwarding state
> root@OpenWrt:/#
> 
> 
> I have more doubts, but hopefully, I will get some answers to them
> from the above questions itself.
> Hope to hear soon!!!
> 
> Thanks and Regards,
> 
> Kaushik NP
> LI | Tw | FB
> SAP Ambassador,
> General Secretary, Computer Society
> Team IEEE UVCE,
> 3rd Year Undergraduate Student,
> University Visvesvaraya College of Engineering,
> Bangalore, IN


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
  2016-10-03 17:08 ` leftbydefault
@ 2016-10-04 10:11   ` Kaushik N P
  2016-10-06 15:09     ` Ufo
  0 siblings, 1 reply; 14+ messages in thread
From: Kaushik N P @ 2016-10-04 10:11 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Hello,

Thank you 'rise.net' for the suggestion. It has given me some ideas,
but what I hoped to do was to run the laptop with OpenWRT working with
Batman adv like a router. This would enable me in creating a more
extensive network without having to buy more routers itself and
hopefully provide me with a more versatile network to work on. I will
ofcourse be experimenting more along your steps, but I hope to get the
QEMU set up and running on my system.

If any one has more info on the QEMU setup, pls do contact.


Thanks and Regards,

Kaushik NP
General Secretary, Computer Society
Team IEEE UVCE,
3rd Year Undergraduate Student,
University Visvesvaraya College of Engineering,
Bangalore, IN


On Mon, Oct 3, 2016 at 10:38 PM,  <leftbydefault@riseup.net> wrote:
> Hello Kaushik
>
> On 2016-10-03 19:44, Kaushik N P wrote:
>>
>> Hello,
>>
>> What I hope to find is:-
>>
>> Another documentation maybe for setting up, or confirmation for
>> setting up (because I can't tell sometimes if the instructions have
>> been followed correctly).
>
>
> I have no experience in simulating or emulating batman-adv, but I have
> experience
> in compiling openwrt from source along with batman-adv and batctl. I can
> help you with that. batman-adv is built as a kernel module and so it is
> included by default in Linux kernels >= 2.x. You have mentioned that you are
> using Linux based operating system, I hope by now, you should be running
> Linux kernel 4.x. If you want to play around with batman-adv for sometime
> before emulating, you can use two three Linux based laptops with WiFi
> interface cards that support IBSS (adhoc mode).
>
> You can check that using
>
>     iw list | grep IBSS
>
> if the command returned something like
> Device supports RSN-IBSS.
>                  * IBSS
>
> then your Wireless NIC can be switched to ad-hoc mode. We have a bash shell
> script that does it automatically for you. You can find the script and
> terminal cast in the following links.
>
>  1. https://github.com/PYMeshnet/scripts
>  2. https://asciinema.org/a/38575
>
>> Clarification for my doubt regarding the different types of OpenWRT
>> images (like Kamikaze, Chaos Calmer, Attitude Adjustment,etc), what do
>> they do and which one I should use for working with standard Batman
>> adv setup.
>
>
> Chaos Calmer (15.x) is the recent stable release of OpenWRT firmware.
> 'Kamikaze, Altitude Adjustment, etc.,' are just different names given to
> different versions of OpenWRT releases. OpenWRT are meant to be the
> operating system for routers and modems. Depending on the configuration of
> devices, some versions may be supported and some may not be supported on
> certain routers and modems.
>
> Since you are trying to create a virtual environment, I think should go with
> Chaos Calmer. (again I have no experience either with creating a virtual
> environment for OpenWRT nor for batman-adv).
>
>
>> Confirmation method to see if qemu having OpenWRT is setup in my
>> system - as now I have a setup in terminal which says
>>
>> BusyBox v1.24.2 () built-in shell (ash)
>>
>> //Says OpenWrt below
>>   _______                     ________        __
>>  |            | .-----.-----.-----.|  |  |  |.----.|  |_
>>  |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
>>  |_______| |  __|____|__|__||________||__|  |____|
>>                 |__| W I R E L E S S   F R E E D O M
>>  -----------------------------------------------------
>>  DESIGNATED DRIVER (Bleeding Edge, 49928)
>>  -----------------------------------------------------
>>   * 2 oz. Orange Juice         Combine all juices in a
>>   * 2 oz. Pineapple Juice      tall glass filled with
>>   * 2 oz. Grapefruit Juice     ice, stir well.
>>   * 2 oz. Cranberry Juice
>>  -----------------------------------------------------
>> root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
>> identified at 0xf0b40000, IRQ: 60
>> [   13.934741] device eth0 entered promiscuous mode
>> [   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
>> [   15.762764] br-lan: port 1(eth0) entered forwarding state
>> [   15.764526] br-lan: port 1(eth0) entered forwarding state
>> [   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
>> [   17.762480] br-lan: port 1(eth0) entered forwarding state
>> root@OpenWrt:/#
>>
>>
>> I have more doubts, but hopefully, I will get some answers to them
>> from the above questions itself.
>> Hope to hear soon!!!
>>
>> Thanks and Regards,
>>
>> Kaushik NP
>> LI | Tw | FB
>> SAP Ambassador,
>> General Secretary, Computer Society
>> Team IEEE UVCE,
>> 3rd Year Undergraduate Student,
>> University Visvesvaraya College of Engineering,
>> Bangalore, IN
>
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
  2016-10-03 14:14 [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv Kaushik N P
  2016-10-03 17:08 ` leftbydefault
@ 2016-10-06  1:28 ` Marek Lindner
  1 sibling, 0 replies; 14+ messages in thread
From: Marek Lindner @ 2016-10-06  1:28 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 1159 bytes --]

On Monday, October 3, 2016 7:44:47 PM HKT Kaushik N P wrote:
> https://www.open-mesh.org/projects/open-mesh/wiki/Emulation (I am not
> sure if my qemu is set up properly for there is no confirmation
> methods that are provided to me to check if its working properly)

What do these 'confirmation methods' you hope to find look like ? I guess to 
most readers it isn't easy to help you because it is unclear what you find 
missing. Another way to go about this is to state what you have done and what 
you found not working. Then we have a clear starting point. 


> Clarification for my doubt regarding the different types of OpenWRT
> images (like Kamikaze, Chaos Calmer, Attitude Adjustment,etc), what do
> they do and which one I should use for working with standard Batman
> adv setup.

That's quite broad too. As explained already, batman-adv is part of the Linux 
kernel. Most of the releases you mentioned run a version of batman-adv. If you 
want the latest batman-adv with the latest kernel / user space features go for 
the latest release.

The image names you mention simply are different releases (Chaos Calmer being 
the latest).


Cheers,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
  2016-10-04 10:11   ` Kaushik N P
@ 2016-10-06 15:09     ` Ufo
       [not found]       ` <CAGghcR7QjF+yugxao-P5YsB_TkC_0D_YU2tc0+dinN9AJhZX9w@mail.gmail.com>
  0 siblings, 1 reply; 14+ messages in thread
From: Ufo @ 2016-10-06 15:09 UTC (permalink / raw)
  To: b.a.t.m.a.n

Testing batman-adv in virtual maschines on laptops is the most complex 
and non-realistic way to start with mesh-networking. So its a nice, very 
demanding student thing.

its much more easier to buy some (more than 2!!) cheap wifi-routers! 
they have proper wifi, more than one ethernet-interface (!) and there 
are many openwrt/lede mesh firmwares with a well-configured batman-adv. 
after that, the next step could be to try to couple your first laptop 
into that mesh. starting with nothing but laptops seems to be too 
"versatile".

if you are unfamiliar with qemu and virtualization your should first try 
to install ubuntu or windows in a virtual machine. please use 
"virt-manager", a graphical interface for that.

unfortunatly the mentioned "stable" openwrt was forced to use a very old 
batman-adv version from 2014. So you might use trunk firmware, and use 
LEDE instead of Openwrt, to have a proper system.

http://ftp.halifax.rwth-aachen.de/lede/snapshots/targets/x86/generic/lede-x86-generic-combined-ext4.img.gz





On 04.10.2016 12:11, Kaushik N P wrote:
> Hello,
>
> Thank you 'rise.net' for the suggestion. It has given me some ideas,
> but what I hoped to do was to run the laptop with OpenWRT working with
> Batman adv like a router. This would enable me in creating a more
> extensive network without having to buy more routers itself and
> hopefully provide me with a more versatile network to work on. I will
> ofcourse be experimenting more along your steps, but I hope to get the
> QEMU set up and running on my system.
>
> If any one has more info on the QEMU setup, pls do contact.
>
>
> Thanks and Regards,
>
> Kaushik NP
> General Secretary, Computer Society
> Team IEEE UVCE,
> 3rd Year Undergraduate Student,
> University Visvesvaraya College of Engineering,
> Bangalore, IN
>
>
> On Mon, Oct 3, 2016 at 10:38 PM,  <leftbydefault@riseup.net> wrote:
>> Hello Kaushik
>>
>> On 2016-10-03 19:44, Kaushik N P wrote:
>>> Hello,
>>>
>>> What I hope to find is:-
>>>
>>> Another documentation maybe for setting up, or confirmation for
>>> setting up (because I can't tell sometimes if the instructions have
>>> been followed correctly).
>>
>> I have no experience in simulating or emulating batman-adv, but I have
>> experience
>> in compiling openwrt from source along with batman-adv and batctl. I can
>> help you with that. batman-adv is built as a kernel module and so it is
>> included by default in Linux kernels >= 2.x. You have mentioned that you are
>> using Linux based operating system, I hope by now, you should be running
>> Linux kernel 4.x. If you want to play around with batman-adv for sometime
>> before emulating, you can use two three Linux based laptops with WiFi
>> interface cards that support IBSS (adhoc mode).
>>
>> You can check that using
>>
>>      iw list | grep IBSS
>>
>> if the command returned something like
>> Device supports RSN-IBSS.
>>                   * IBSS
>>
>> then your Wireless NIC can be switched to ad-hoc mode. We have a bash shell
>> script that does it automatically for you. You can find the script and
>> terminal cast in the following links.
>>
>>   1. https://github.com/PYMeshnet/scripts
>>   2. https://asciinema.org/a/38575
>>
>>> Clarification for my doubt regarding the different types of OpenWRT
>>> images (like Kamikaze, Chaos Calmer, Attitude Adjustment,etc), what do
>>> they do and which one I should use for working with standard Batman
>>> adv setup.
>>
>> Chaos Calmer (15.x) is the recent stable release of OpenWRT firmware.
>> 'Kamikaze, Altitude Adjustment, etc.,' are just different names given to
>> different versions of OpenWRT releases. OpenWRT are meant to be the
>> operating system for routers and modems. Depending on the configuration of
>> devices, some versions may be supported and some may not be supported on
>> certain routers and modems.
>>
>> Since you are trying to create a virtual environment, I think should go with
>> Chaos Calmer. (again I have no experience either with creating a virtual
>> environment for OpenWRT nor for batman-adv).
>>
>>
>>> Confirmation method to see if qemu having OpenWRT is setup in my
>>> system - as now I have a setup in terminal which says
>>>
>>> BusyBox v1.24.2 () built-in shell (ash)
>>>
>>> //Says OpenWrt below
>>>    _______                     ________        __
>>>   |            | .-----.-----.-----.|  |  |  |.----.|  |_
>>>   |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
>>>   |_______| |  __|____|__|__||________||__|  |____|
>>>                  |__| W I R E L E S S   F R E E D O M
>>>   -----------------------------------------------------
>>>   DESIGNATED DRIVER (Bleeding Edge, 49928)
>>>   -----------------------------------------------------
>>>    * 2 oz. Orange Juice         Combine all juices in a
>>>    * 2 oz. Pineapple Juice      tall glass filled with
>>>    * 2 oz. Grapefruit Juice     ice, stir well.
>>>    * 2 oz. Cranberry Juice
>>>   -----------------------------------------------------
>>> root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
>>> identified at 0xf0b40000, IRQ: 60
>>> [   13.934741] device eth0 entered promiscuous mode
>>> [   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
>>> [   15.762764] br-lan: port 1(eth0) entered forwarding state
>>> [   15.764526] br-lan: port 1(eth0) entered forwarding state
>>> [   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
>>> [   17.762480] br-lan: port 1(eth0) entered forwarding state
>>> root@OpenWrt:/#
>>>
>>>
>>> I have more doubts, but hopefully, I will get some answers to them
>>> from the above questions itself.
>>> Hope to hear soon!!!
>>>
>>> Thanks and Regards,
>>>
>>> Kaushik NP
>>> LI | Tw | FB
>>> SAP Ambassador,
>>> General Secretary, Computer Society
>>> Team IEEE UVCE,
>>> 3rd Year Undergraduate Student,
>>> University Visvesvaraya College of Engineering,
>>> Bangalore, IN
>>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
       [not found]       ` <CAGghcR7QjF+yugxao-P5YsB_TkC_0D_YU2tc0+dinN9AJhZX9w@mail.gmail.com>
@ 2016-10-07 19:53         ` Kaushik N P
  2016-10-08  3:22           ` jmh8
  0 siblings, 1 reply; 14+ messages in thread
From: Kaushik N P @ 2016-10-07 19:53 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Hello,

Good to hear it is tough to work on in Linux and that am not the only
person finding it difficult working on it.

@Ufo : Yes, it might be tough, but we learn from experience on working
on such stuff after all. I have two routers but want to setup a bigger
mesh bed with more nodes and would prefer not to spend more for now.
And mainly I think working on Linux would provide me a better
understanding and would allow me to experiment more on it. I have
worked with Virtual machines before, though with minimal
experimentation at that. And I will definitely check out LEDE. Thank
you for the suggestion.

@Marek : Yes, I know it was a half baked question I presented, but
wasn't sure how to put up my query more clearly. Now I will list out
the steps I have followed till now and what the results are.

Links I followed primarily:
[1] https://wiki.openwrt.org/doc/howto/qemu
[2] https://www.open-mesh.org/projects/open-mesh/wiki/Emulation

So, the link [1] defines setting up QEMU. Again, I am working on
Ubuntu 16.0, 64-bit.

As far as I could see, only the Commands in  'Booting from SD card
image' was related. Have downloaded openwrt-realview-vmlinux.elf ,
openwrt-realview-sdcard.img and type in the command below :

qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
    -kernel openwrt-realview-vmlinux.elf \
    -sd openwrt-realview-sdcard.img \
    -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"


This command opened up a BusyBox which looks as follows :

BusyBox v1.24.2 () built-in shell (ash)

//Says OpenWrt below
  _______                     ________        __
 |            | .-----.-----.-----.|  |  |  |.----.|  |_
 |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
 |_______| |  __|____|__|__||________||__|  |____|
                |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 DESIGNATED DRIVER (Bleeding Edge, 49928)
 -----------------------------------------------------
  * 2 oz. Orange Juice         Combine all juices in a
  * 2 oz. Pineapple Juice      tall glass filled with
  * 2 oz. Grapefruit Juice     ice, stir well.
  * 2 oz. Cranberry Juice
 -----------------------------------------------------
root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
identified at 0xf0b40000, IRQ: 60
[   13.934741] device eth0 entered promiscuous mode
[   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   15.762764] br-lan: port 1(eth0) entered forwarding state
[   15.764526] br-lan: port 1(eth0) entered forwarding state
[   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   17.762480] br-lan: port 1(eth0) entered forwarding state
root@OpenWrt:/#

There is no details on what to do once this opens up though. And I
still need confirmation as to what this means. Is it that QEMU has
loaded OpenWRT in my system like a virtual machine or is it a console
to access OpenWRT functionalities, etc.

After this I made changes according to "openwrt virtualized using
debian, qemu/kvm and a lex twitter system with intel atom d525 and
chipset ich8m" section to 'Virtualization proper' too in case it was
required, but the Virtualization didn't work.


This done, I moved to link [2], where it explains how to set up mesh
testbed. It says"OpenWrt, kamikaze trunk version for x86 with minimal
modifications" and so I have downloaded 'openwrt-x86-ext2.image' from
Kamikaze. Changed the above code used to load QEMU as :
qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
>     -kernel openwrt-realview-vmlinux.elf \
>     -sd openwrt- \
>     -sd openwrt-x86-ext2.image \
>     -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"

But loading this hasn't been successful as doing this gives :
...<loading and stuff>...
[    1.304028] VFS: Mounted root (ext2 filesystem) readonly on device 179:1.
[    1.317832] Freeing unused kernel memory: 196K (c0481000 - c04b2000)
[    1.328078] Kernel panic - not syncing: No working init found.  Try
passing init= option to kernel. See Linux Documentation/init.txt for
guidance.
[    1.332338] ---[ end Kernel panic - not syncing: No working init
found.  Try passing init= option to kernel. See Linux
Documentation/init.txt for guidance.


Next, running the script written in 'OpenWrt' section doesn't work as it says :
/tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
/sys/kernel/debug/batman_adv/bat0/log: No such file
/tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
/sys/kernel/debug/batman_adv/bat0/log: No such file

Commenting the lines that open this file :
while [ 1 ]; do
    nc -l -p 2050 < /sys/kernel/debug/batman_adv/bat0/log
done

gives the error :
RTNETLINK answers: File exists
Cannot find device "br-lan"
Cannot find device "br-lan"
./rc.local: 23: ./rc.local: cannot create
/proc/net/batman-adv/interfaces: Directory nonexistent
./rc.local: 24: ./rc.local: cannot create
/proc/net/batman-adv/interfaces: Directory nonexistent
./rc.local: 25: ./rc.local: cannot create
/proc/net/batman-adv/log_level: Directory nonexistent
/tmp/logserver.sh: 1: /tmp/logserver.sh: !/bin/sh: not found
Cannot find device "bat0"
Cannot find device "bat0"

Next, I have patched both 'vde2-2.3.2_colour.patch' and
'vde2-2.3.2-wirefilter-ethertype.patch'

The final step lists a script for running the scripts to start up all
the qemu windows. This throw up a lot many errors.
Below is the error it shows:

kaushik@kaushik-HP:~/QEMUopenwrt$ ./command.sh
Must be run inside a screen session
[sudo] password for kaushik:
wirefilter(8722): Operation not permitted
wirefilter(8724): Operation not permitted
wirefilter(8726): Operation not permitted
wirefilter(8728): Operation not permitted
wirefilter(8730): Operation not permitted
wirefilter(8732): Operation not permitted
wirefilter(8734): Operation not permitted
wirefilter(8736): Operation not permitted
wirefilter(8738): Operation not permitted
wirefilter(8740): Operation not permitted
wirefilter(8742): Operation not permitted
wirefilter(8744): Operation not permitted
wirefilter(8746): Operation not permitted
wirefilter(8748): Operation not permitted
wirefilter(8750): Operation not permitted
vde_switch(8567): Operation not permitted
vde_switch(8575): Operation not permitted
vde_switch(8583): Operation not permitted
vde_switch(8591): Operation not permitted
vde_switch(8599): Operation not permitted
vde_switch(8607): Operation not permitted
vde_switch(8615): Operation not permitted
vde_switch(8623): Operation not permitted
vde_switch(8631): Operation not permitted
ioctl(TUNSETIFF): Device or resource busy
RTNETLINK answers: File exists
ioctl(TUNSETIFF): Device or resource busy
RTNETLINK answers: File exists
ioctl(TUNSETIFF): Device or resource busy
RTNETLINK answers: File exists
ioctl(TUNSETIFF): Device or resource busy
RTNETLINK answers: File exists
ioctl(TUNSETIFF): Device or resource busy
RTNETLINK answers: File exists
ioctl(TUNSETIFF): Device or resource busy
.
.
.

This I run in a screen as it is mentioned in the guide. It creates
many files and folders named num0 to num9, but doesn't proceed after
that.


This and some more experimentation I have done with it. So, any help I
can get would be most welcome

Thanks and Regards,

Kaushik NP
LI | Tw | FB
SAP Ambassador,
General Secretary, Computer Society
Team IEEE UVCE,
3rd Year Undergraduate Student,
University Visvesvaraya College of Engineering,
Bangalore, IN


On Sat, Oct 8, 2016 at 1:21 AM, Kaushik N P <kaushik.np.in@ieee.org> wrote:
> Hello,
>
> Good to hear it is tough to work on in Linux and that am not the only person
> finding it difficult working on it.
>
> @Ufo : Yes, it might be tough, but we learn from experience on working on
> such stuff after all. I have two routers but want to setup a bigger mesh bed
> with more nodes and would prefer not to spend more for now. And mainly I
> think working on Linux would provide me a better understanding and would
> allow me to experiment more on it. I have worked with Virtual machines
> before, though with minimal experimentation at that. And I will definitely
> check out LEDE. Thank you for the suggestion.
>
> @Marek : Yes, I know it was a half baked question I presented, but wasn't
> sure how to put up my query more clearly. Now I will list out the steps I
> have followed till now and what the results are.
>
> Links I followed primarily:
> [1] https://wiki.openwrt.org/doc/howto/qemu
> [2] https://www.open-mesh.org/projects/open-mesh/wiki/Emulation
>
> So, the link [1] defines setting up QEMU. Again, I am working on Ubuntu
> 16.0, 64-bit.
>
> As far as I could see, only the Commands in  'Booting from SD card image'
> was related. Have downloaded openwrt-realview-vmlinux.elf ,
> openwrt-realview-sdcard.img and type in the command below :
>
> qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
>     -kernel openwrt-realview-vmlinux.elf \
>     -sd openwrt-realview-sdcard.img \
>     -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"
>
>
> This command opened up a BusyBox which looks as follows :
>
> BusyBox v1.24.2 () built-in shell (ash)
>
> //Says OpenWrt below
>   _______                     ________        __
>  |            | .-----.-----.-----.|  |  |  |.----.|  |_
>  |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
>  |_______| |  __|____|__|__||________||__|  |____|
>                 |__| W I R E L E S S   F R E E D O M
>  -----------------------------------------------------
>  DESIGNATED DRIVER (Bleeding Edge, 49928)
>  -----------------------------------------------------
>   * 2 oz. Orange Juice         Combine all juices in a
>   * 2 oz. Pineapple Juice      tall glass filled with
>   * 2 oz. Grapefruit Juice     ice, stir well.
>   * 2 oz. Cranberry Juice
>  -----------------------------------------------------
> root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
> identified at 0xf0b40000, IRQ: 60
> [   13.934741] device eth0 entered promiscuous mode
> [   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
> [   15.762764] br-lan: port 1(eth0) entered forwarding state
> [   15.764526] br-lan: port 1(eth0) entered forwarding state
> [   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
> [   17.762480] br-lan: port 1(eth0) entered forwarding state
> root@OpenWrt:/#
>
> There is no details on what to do once this opens up though. And I still
> need confirmation as to what this means. Is it that QEMU has loaded OpenWRT
> in my system like a virtual machine or is it a console to access OpenWRT
> functionalities, etc.
>
> After this I made changes according to "openwrt virtualized using debian,
> qemu/kvm and a lex twitter system with intel atom d525 and chipset ich8m"
> section to 'Virtualization proper' too in case it was required, but the
> Virtualization didn't work.
>
>
> This done, I moved to link [2], where it explains how to set up mesh
> testbed. It says"OpenWrt, kamikaze trunk version for x86 with minimal
> modifications" and so I have downloaded 'openwrt-x86-ext2.image' from
> Kamikaze. Changed the above code used to load QEMU as :
> qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
>>     -kernel openwrt-realview-vmlinux.elf \
>>     -sd openwrt- \
>>     -sd openwrt-x86-ext2.image \
>>     -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"
>
> But loading this hasn't been successful as doing this gives :
> ...<loading and stuff>...
> [    1.304028] VFS: Mounted root (ext2 filesystem) readonly on device 179:1.
> [    1.317832] Freeing unused kernel memory: 196K (c0481000 - c04b2000)
> [    1.328078] Kernel panic - not syncing: No working init found.  Try
> passing init= option to kernel. See Linux Documentation/init.txt for
> guidance.
> [    1.332338] ---[ end Kernel panic - not syncing: No working init found.
> Try passing init= option to kernel. See Linux Documentation/init.txt for
> guidance.
>
>
> Next, running the script written in 'OpenWrt' section doesn't work as it
> says :
> /tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
> /sys/kernel/debug/batman_adv/bat0/log: No such file
> /tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
> /sys/kernel/debug/batman_adv/bat0/log: No such file
>
> Commenting the lines that open this file :
> while [ 1 ]; do
>     nc -l -p 2050 < /sys/kernel/debug/batman_adv/bat0/log
> done
>
> gives the error :
> RTNETLINK answers: File exists
> Cannot find device "br-lan"
> Cannot find device "br-lan"
> ./rc.local: 23: ./rc.local: cannot create /proc/net/batman-adv/interfaces:
> Directory nonexistent
> ./rc.local: 24: ./rc.local: cannot create /proc/net/batman-adv/interfaces:
> Directory nonexistent
> ./rc.local: 25: ./rc.local: cannot create /proc/net/batman-adv/log_level:
> Directory nonexistent
> /tmp/logserver.sh: 1: /tmp/logserver.sh: !/bin/sh: not found
> Cannot find device "bat0"
> Cannot find device "bat0"
>
> Next, I have patched both 'vde2-2.3.2_colour.patch' and
> 'vde2-2.3.2-wirefilter-ethertype.patch'
>
> The final step lists a script for running the scripts to start up all the
> qemu windows. This throw up a lot many errors.
> Below is the error it shows:
>
> kaushik@kaushik-HP:~/QEMUopenwrt$ ./command.sh
> Must be run inside a screen session
> [sudo] password for kaushik:
> wirefilter(8722): Operation not permitted
> wirefilter(8724): Operation not permitted
> wirefilter(8726): Operation not permitted
> wirefilter(8728): Operation not permitted
> wirefilter(8730): Operation not permitted
> wirefilter(8732): Operation not permitted
> wirefilter(8734): Operation not permitted
> wirefilter(8736): Operation not permitted
> wirefilter(8738): Operation not permitted
> wirefilter(8740): Operation not permitted
> wirefilter(8742): Operation not permitted
> wirefilter(8744): Operation not permitted
> wirefilter(8746): Operation not permitted
> wirefilter(8748): Operation not permitted
> wirefilter(8750): Operation not permitted
> vde_switch(8567): Operation not permitted
> vde_switch(8575): Operation not permitted
> vde_switch(8583): Operation not permitted
> vde_switch(8591): Operation not permitted
> vde_switch(8599): Operation not permitted
> vde_switch(8607): Operation not permitted
> vde_switch(8615): Operation not permitted
> vde_switch(8623): Operation not permitted
> vde_switch(8631): Operation not permitted
> ioctl(TUNSETIFF): Device or resource busy
> RTNETLINK answers: File exists
> ioctl(TUNSETIFF): Device or resource busy
> RTNETLINK answers: File exists
> ioctl(TUNSETIFF): Device or resource busy
> RTNETLINK answers: File exists
> ioctl(TUNSETIFF): Device or resource busy
> RTNETLINK answers: File exists
> ioctl(TUNSETIFF): Device or resource busy
> RTNETLINK answers: File exists
> ioctl(TUNSETIFF): Device or resource busy
> .
> .
> .
>
> This I run in a screen as it is mentioned in the guide. It creates many
> files and folders named num0 to num9, but doesn't proceed after that.
>
>
> This and some more experimentation I have done with it. So, any help I can
> get would be most welcome
>
>
> Thanks and Regards,
>
> Kaushik NP
> LI | Tw | FB
> SAP Ambassador,
> General Secretary, Computer Society
> Team IEEE UVCE,
> 3rd Year Undergraduate Student,
> University Visvesvaraya College of Engineering,
> Bangalore, IN
>
> On Thu, Oct 6, 2016 at 8:39 PM, Ufo <ufo@rund.freifunk.net> wrote:
>>
>> Testing batman-adv in virtual maschines on laptops is the most complex and
>> non-realistic way to start with mesh-networking. So its a nice, very
>> demanding student thing.
>>
>> its much more easier to buy some (more than 2!!) cheap wifi-routers! they
>> have proper wifi, more than one ethernet-interface (!) and there are many
>> openwrt/lede mesh firmwares with a well-configured batman-adv. after that,
>> the next step could be to try to couple your first laptop into that mesh.
>> starting with nothing but laptops seems to be too "versatile".
>>
>> if you are unfamiliar with qemu and virtualization your should first try
>> to install ubuntu or windows in a virtual machine. please use
>> "virt-manager", a graphical interface for that.
>>
>> unfortunatly the mentioned "stable" openwrt was forced to use a very old
>> batman-adv version from 2014. So you might use trunk firmware, and use LEDE
>> instead of Openwrt, to have a proper system.
>>
>>
>> http://ftp.halifax.rwth-aachen.de/lede/snapshots/targets/x86/generic/lede-x86-generic-combined-ext4.img.gz
>>
>>
>>
>>
>>
>>
>> On 04.10.2016 12:11, Kaushik N P wrote:
>>>
>>> Hello,
>>>
>>> Thank you 'rise.net' for the suggestion. It has given me some ideas,
>>> but what I hoped to do was to run the laptop with OpenWRT working with
>>> Batman adv like a router. This would enable me in creating a more
>>> extensive network without having to buy more routers itself and
>>> hopefully provide me with a more versatile network to work on. I will
>>> ofcourse be experimenting more along your steps, but I hope to get the
>>> QEMU set up and running on my system.
>>>
>>> If any one has more info on the QEMU setup, pls do contact.
>>>
>>>
>>> Thanks and Regards,
>>>
>>> Kaushik NP
>>> General Secretary, Computer Society
>>> Team IEEE UVCE,
>>> 3rd Year Undergraduate Student,
>>> University Visvesvaraya College of Engineering,
>>> Bangalore, IN
>>>
>>>
>>> On Mon, Oct 3, 2016 at 10:38 PM,  <leftbydefault@riseup.net> wrote:
>>>>
>>>> Hello Kaushik
>>>>
>>>> On 2016-10-03 19:44, Kaushik N P wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> What I hope to find is:-
>>>>>
>>>>> Another documentation maybe for setting up, or confirmation for
>>>>> setting up (because I can't tell sometimes if the instructions have
>>>>> been followed correctly).
>>>>
>>>>
>>>> I have no experience in simulating or emulating batman-adv, but I have
>>>> experience
>>>> in compiling openwrt from source along with batman-adv and batctl. I can
>>>> help you with that. batman-adv is built as a kernel module and so it is
>>>> included by default in Linux kernels >= 2.x. You have mentioned that you
>>>> are
>>>> using Linux based operating system, I hope by now, you should be running
>>>> Linux kernel 4.x. If you want to play around with batman-adv for
>>>> sometime
>>>> before emulating, you can use two three Linux based laptops with WiFi
>>>> interface cards that support IBSS (adhoc mode).
>>>>
>>>> You can check that using
>>>>
>>>>      iw list | grep IBSS
>>>>
>>>> if the command returned something like
>>>> Device supports RSN-IBSS.
>>>>                   * IBSS
>>>>
>>>> then your Wireless NIC can be switched to ad-hoc mode. We have a bash
>>>> shell
>>>> script that does it automatically for you. You can find the script and
>>>> terminal cast in the following links.
>>>>
>>>>   1. https://github.com/PYMeshnet/scripts
>>>>   2. https://asciinema.org/a/38575
>>>>
>>>>> Clarification for my doubt regarding the different types of OpenWRT
>>>>> images (like Kamikaze, Chaos Calmer, Attitude Adjustment,etc), what do
>>>>> they do and which one I should use for working with standard Batman
>>>>> adv setup.
>>>>
>>>>
>>>> Chaos Calmer (15.x) is the recent stable release of OpenWRT firmware.
>>>> 'Kamikaze, Altitude Adjustment, etc.,' are just different names given to
>>>> different versions of OpenWRT releases. OpenWRT are meant to be the
>>>> operating system for routers and modems. Depending on the configuration
>>>> of
>>>> devices, some versions may be supported and some may not be supported on
>>>> certain routers and modems.
>>>>
>>>> Since you are trying to create a virtual environment, I think should go
>>>> with
>>>> Chaos Calmer. (again I have no experience either with creating a virtual
>>>> environment for OpenWRT nor for batman-adv).
>>>>
>>>>
>>>>> Confirmation method to see if qemu having OpenWRT is setup in my
>>>>> system - as now I have a setup in terminal which says
>>>>>
>>>>> BusyBox v1.24.2 () built-in shell (ash)
>>>>>
>>>>> //Says OpenWrt below
>>>>>    _______                     ________        __
>>>>>   |            | .-----.-----.-----.|  |  |  |.----.|  |_
>>>>>   |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
>>>>>   |_______| |  __|____|__|__||________||__|  |____|
>>>>>                  |__| W I R E L E S S   F R E E D O M
>>>>>   -----------------------------------------------------
>>>>>   DESIGNATED DRIVER (Bleeding Edge, 49928)
>>>>>   -----------------------------------------------------
>>>>>    * 2 oz. Orange Juice         Combine all juices in a
>>>>>    * 2 oz. Pineapple Juice      tall glass filled with
>>>>>    * 2 oz. Grapefruit Juice     ice, stir well.
>>>>>    * 2 oz. Cranberry Juice
>>>>>   -----------------------------------------------------
>>>>> root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
>>>>> identified at 0xf0b40000, IRQ: 60
>>>>> [   13.934741] device eth0 entered promiscuous mode
>>>>> [   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
>>>>> [   15.762764] br-lan: port 1(eth0) entered forwarding state
>>>>> [   15.764526] br-lan: port 1(eth0) entered forwarding state
>>>>> [   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes
>>>>> ready
>>>>> [   17.762480] br-lan: port 1(eth0) entered forwarding state
>>>>> root@OpenWrt:/#
>>>>>
>>>>>
>>>>> I have more doubts, but hopefully, I will get some answers to them
>>>>> from the above questions itself.
>>>>> Hope to hear soon!!!
>>>>>
>>>>> Thanks and Regards,
>>>>>
>>>>> Kaushik NP
>>>>> LI | Tw | FB
>>>>> SAP Ambassador,
>>>>> General Secretary, Computer Society
>>>>> Team IEEE UVCE,
>>>>> 3rd Year Undergraduate Student,
>>>>> University Visvesvaraya College of Engineering,
>>>>> Bangalore, IN
>>>>
>>>>
>>
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
  2016-10-07 19:53         ` Kaushik N P
@ 2016-10-08  3:22           ` jmh8
  2016-10-10 15:21             ` Kaushik N P
  0 siblings, 1 reply; 14+ messages in thread
From: jmh8 @ 2016-10-08  3:22 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking


Hi Kaushik N P,

    I too have been experimenting with mesh. Another wrinkle comes from 
there being no really open standard for RF mesh operation. So meshes ONLY 
work well if a given manufacturer's chips are used. In other words having 
a really open RF specification has yet to be done. GSM probably comes 
closest to a real useful open RF specification.

    My guess is that this will be by far the biggest problem you face. The 
software part is as you suggest easy. But having or creating really good 
RF test equipment and techniques will be THE problem.

    So the war right now is in the RF insides of the various chips all of 
which are corporate secrets.

    Perhaps you can find some combination of some fast fpgas and some well 
documented RF chip building blocks that will help. I have been wondering 
what this might be? As far as I know, ADCs and DACs that are directly 
useful at 2.4 and 5GHZ have yet to become available.

    If it is still on the web, you might check out MITs roof net project. 
Some of that data is pretty interesting.

    If my recently purchased $10USD 3G telephone were an open design, I 
could perhaps reprogram it?

    Just my thoughts.

    Good luck with your efforts.

    John


On Sat, 8 Oct 2016, Kaushik N P wrote:

> Hello,
>
> Good to hear it is tough to work on in Linux and that am not the only
> person finding it difficult working on it.
>
> @Ufo : Yes, it might be tough, but we learn from experience on working
> on such stuff after all. I have two routers but want to setup a bigger
> mesh bed with more nodes and would prefer not to spend more for now.
> And mainly I think working on Linux would provide me a better
> understanding and would allow me to experiment more on it. I have
> worked with Virtual machines before, though with minimal
> experimentation at that. And I will definitely check out LEDE. Thank
> you for the suggestion.
>
> @Marek : Yes, I know it was a half baked question I presented, but
> wasn't sure how to put up my query more clearly. Now I will list out
> the steps I have followed till now and what the results are.
>
> Links I followed primarily:
> [1] https://wiki.openwrt.org/doc/howto/qemu
> [2] https://www.open-mesh.org/projects/open-mesh/wiki/Emulation
>
> So, the link [1] defines setting up QEMU. Again, I am working on
> Ubuntu 16.0, 64-bit.
>
> As far as I could see, only the Commands in  'Booting from SD card
> image' was related. Have downloaded openwrt-realview-vmlinux.elf ,
> openwrt-realview-sdcard.img and type in the command below :
>
> qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
>    -kernel openwrt-realview-vmlinux.elf \
>    -sd openwrt-realview-sdcard.img \
>    -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"
>
>
> This command opened up a BusyBox which looks as follows :
>
> BusyBox v1.24.2 () built-in shell (ash)
>
> //Says OpenWrt below
>  _______                     ________        __
> |            | .-----.-----.-----.|  |  |  |.----.|  |_
> |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
> |_______| |  __|____|__|__||________||__|  |____|
>                |__| W I R E L E S S   F R E E D O M
> -----------------------------------------------------
> DESIGNATED DRIVER (Bleeding Edge, 49928)
> -----------------------------------------------------
>  * 2 oz. Orange Juice         Combine all juices in a
>  * 2 oz. Pineapple Juice      tall glass filled with
>  * 2 oz. Grapefruit Juice     ice, stir well.
>  * 2 oz. Cranberry Juice
> -----------------------------------------------------
> root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
> identified at 0xf0b40000, IRQ: 60
> [   13.934741] device eth0 entered promiscuous mode
> [   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
> [   15.762764] br-lan: port 1(eth0) entered forwarding state
> [   15.764526] br-lan: port 1(eth0) entered forwarding state
> [   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
> [   17.762480] br-lan: port 1(eth0) entered forwarding state
> root@OpenWrt:/#
>
> There is no details on what to do once this opens up though. And I
> still need confirmation as to what this means. Is it that QEMU has
> loaded OpenWRT in my system like a virtual machine or is it a console
> to access OpenWRT functionalities, etc.
>
> After this I made changes according to "openwrt virtualized using
> debian, qemu/kvm and a lex twitter system with intel atom d525 and
> chipset ich8m" section to 'Virtualization proper' too in case it was
> required, but the Virtualization didn't work.
>
>
> This done, I moved to link [2], where it explains how to set up mesh
> testbed. It says"OpenWrt, kamikaze trunk version for x86 with minimal
> modifications" and so I have downloaded 'openwrt-x86-ext2.image' from
> Kamikaze. Changed the above code used to load QEMU as :
> qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
>>     -kernel openwrt-realview-vmlinux.elf \
>>     -sd openwrt- \
>>     -sd openwrt-x86-ext2.image \
>>     -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"
>
> But loading this hasn't been successful as doing this gives :
> ...<loading and stuff>...
> [    1.304028] VFS: Mounted root (ext2 filesystem) readonly on device 179:1.
> [    1.317832] Freeing unused kernel memory: 196K (c0481000 - c04b2000)
> [    1.328078] Kernel panic - not syncing: No working init found.  Try
> passing init= option to kernel. See Linux Documentation/init.txt for
> guidance.
> [    1.332338] ---[ end Kernel panic - not syncing: No working init
> found.  Try passing init= option to kernel. See Linux
> Documentation/init.txt for guidance.
>
>
> Next, running the script written in 'OpenWrt' section doesn't work as it says :
> /tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
> /sys/kernel/debug/batman_adv/bat0/log: No such file
> /tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
> /sys/kernel/debug/batman_adv/bat0/log: No such file
>
> Commenting the lines that open this file :
> while [ 1 ]; do
>    nc -l -p 2050 < /sys/kernel/debug/batman_adv/bat0/log
> done
>
> gives the error :
> RTNETLINK answers: File exists
> Cannot find device "br-lan"
> Cannot find device "br-lan"
> ./rc.local: 23: ./rc.local: cannot create
> /proc/net/batman-adv/interfaces: Directory nonexistent
> ./rc.local: 24: ./rc.local: cannot create
> /proc/net/batman-adv/interfaces: Directory nonexistent
> ./rc.local: 25: ./rc.local: cannot create
> /proc/net/batman-adv/log_level: Directory nonexistent
> /tmp/logserver.sh: 1: /tmp/logserver.sh: !/bin/sh: not found
> Cannot find device "bat0"
> Cannot find device "bat0"
>
> Next, I have patched both 'vde2-2.3.2_colour.patch' and
> 'vde2-2.3.2-wirefilter-ethertype.patch'
>
> The final step lists a script for running the scripts to start up all
> the qemu windows. This throw up a lot many errors.
> Below is the error it shows:
>
> kaushik@kaushik-HP:~/QEMUopenwrt$ ./command.sh
> Must be run inside a screen session
> [sudo] password for kaushik:
> wirefilter(8722): Operation not permitted
> wirefilter(8724): Operation not permitted
> wirefilter(8726): Operation not permitted
> wirefilter(8728): Operation not permitted
> wirefilter(8730): Operation not permitted
> wirefilter(8732): Operation not permitted
> wirefilter(8734): Operation not permitted
> wirefilter(8736): Operation not permitted
> wirefilter(8738): Operation not permitted
> wirefilter(8740): Operation not permitted
> wirefilter(8742): Operation not permitted
> wirefilter(8744): Operation not permitted
> wirefilter(8746): Operation not permitted
> wirefilter(8748): Operation not permitted
> wirefilter(8750): Operation not permitted
> vde_switch(8567): Operation not permitted
> vde_switch(8575): Operation not permitted
> vde_switch(8583): Operation not permitted
> vde_switch(8591): Operation not permitted
> vde_switch(8599): Operation not permitted
> vde_switch(8607): Operation not permitted
> vde_switch(8615): Operation not permitted
> vde_switch(8623): Operation not permitted
> vde_switch(8631): Operation not permitted
> ioctl(TUNSETIFF): Device or resource busy
> RTNETLINK answers: File exists
> ioctl(TUNSETIFF): Device or resource busy
> RTNETLINK answers: File exists
> ioctl(TUNSETIFF): Device or resource busy
> RTNETLINK answers: File exists
> ioctl(TUNSETIFF): Device or resource busy
> RTNETLINK answers: File exists
> ioctl(TUNSETIFF): Device or resource busy
> RTNETLINK answers: File exists
> ioctl(TUNSETIFF): Device or resource busy
> .
> .
> .
>
> This I run in a screen as it is mentioned in the guide. It creates
> many files and folders named num0 to num9, but doesn't proceed after
> that.
>
>
> This and some more experimentation I have done with it. So, any help I
> can get would be most welcome
>
> Thanks and Regards,
>
> Kaushik NP
> LI | Tw | FB
> SAP Ambassador,
> General Secretary, Computer Society
> Team IEEE UVCE,
> 3rd Year Undergraduate Student,
> University Visvesvaraya College of Engineering,
> Bangalore, IN
>
>
> On Sat, Oct 8, 2016 at 1:21 AM, Kaushik N P <kaushik.np.in@ieee.org> wrote:
>> Hello,
>>
>> Good to hear it is tough to work on in Linux and that am not the only person
>> finding it difficult working on it.
>>
>> @Ufo : Yes, it might be tough, but we learn from experience on working on
>> such stuff after all. I have two routers but want to setup a bigger mesh bed
>> with more nodes and would prefer not to spend more for now. And mainly I
>> think working on Linux would provide me a better understanding and would
>> allow me to experiment more on it. I have worked with Virtual machines
>> before, though with minimal experimentation at that. And I will definitely
>> check out LEDE. Thank you for the suggestion.
>>
>> @Marek : Yes, I know it was a half baked question I presented, but wasn't
>> sure how to put up my query more clearly. Now I will list out the steps I
>> have followed till now and what the results are.
>>
>> Links I followed primarily:
>> [1] https://wiki.openwrt.org/doc/howto/qemu
>> [2] https://www.open-mesh.org/projects/open-mesh/wiki/Emulation
>>
>> So, the link [1] defines setting up QEMU. Again, I am working on Ubuntu
>> 16.0, 64-bit.
>>
>> As far as I could see, only the Commands in  'Booting from SD card image'
>> was related. Have downloaded openwrt-realview-vmlinux.elf ,
>> openwrt-realview-sdcard.img and type in the command below :
>>
>> qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
>>     -kernel openwrt-realview-vmlinux.elf \
>>     -sd openwrt-realview-sdcard.img \
>>     -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"
>>
>>
>> This command opened up a BusyBox which looks as follows :
>>
>> BusyBox v1.24.2 () built-in shell (ash)
>>
>> //Says OpenWrt below
>>   _______                     ________        __
>>  |            | .-----.-----.-----.|  |  |  |.----.|  |_
>>  |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
>>  |_______| |  __|____|__|__||________||__|  |____|
>>                 |__| W I R E L E S S   F R E E D O M
>>  -----------------------------------------------------
>>  DESIGNATED DRIVER (Bleeding Edge, 49928)
>>  -----------------------------------------------------
>>   * 2 oz. Orange Juice         Combine all juices in a
>>   * 2 oz. Pineapple Juice      tall glass filled with
>>   * 2 oz. Grapefruit Juice     ice, stir well.
>>   * 2 oz. Cranberry Juice
>>  -----------------------------------------------------
>> root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
>> identified at 0xf0b40000, IRQ: 60
>> [   13.934741] device eth0 entered promiscuous mode
>> [   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
>> [   15.762764] br-lan: port 1(eth0) entered forwarding state
>> [   15.764526] br-lan: port 1(eth0) entered forwarding state
>> [   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
>> [   17.762480] br-lan: port 1(eth0) entered forwarding state
>> root@OpenWrt:/#
>>
>> There is no details on what to do once this opens up though. And I still
>> need confirmation as to what this means. Is it that QEMU has loaded OpenWRT
>> in my system like a virtual machine or is it a console to access OpenWRT
>> functionalities, etc.
>>
>> After this I made changes according to "openwrt virtualized using debian,
>> qemu/kvm and a lex twitter system with intel atom d525 and chipset ich8m"
>> section to 'Virtualization proper' too in case it was required, but the
>> Virtualization didn't work.
>>
>>
>> This done, I moved to link [2], where it explains how to set up mesh
>> testbed. It says"OpenWrt, kamikaze trunk version for x86 with minimal
>> modifications" and so I have downloaded 'openwrt-x86-ext2.image' from
>> Kamikaze. Changed the above code used to load QEMU as :
>> qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
>>>     -kernel openwrt-realview-vmlinux.elf \
>>>     -sd openwrt- \
>>>     -sd openwrt-x86-ext2.image \
>>>     -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"
>>
>> But loading this hasn't been successful as doing this gives :
>> ...<loading and stuff>...
>> [    1.304028] VFS: Mounted root (ext2 filesystem) readonly on device 179:1.
>> [    1.317832] Freeing unused kernel memory: 196K (c0481000 - c04b2000)
>> [    1.328078] Kernel panic - not syncing: No working init found.  Try
>> passing init= option to kernel. See Linux Documentation/init.txt for
>> guidance.
>> [    1.332338] ---[ end Kernel panic - not syncing: No working init found.
>> Try passing init= option to kernel. See Linux Documentation/init.txt for
>> guidance.
>>
>>
>> Next, running the script written in 'OpenWrt' section doesn't work as it
>> says :
>> /tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
>> /sys/kernel/debug/batman_adv/bat0/log: No such file
>> /tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
>> /sys/kernel/debug/batman_adv/bat0/log: No such file
>>
>> Commenting the lines that open this file :
>> while [ 1 ]; do
>>     nc -l -p 2050 < /sys/kernel/debug/batman_adv/bat0/log
>> done
>>
>> gives the error :
>> RTNETLINK answers: File exists
>> Cannot find device "br-lan"
>> Cannot find device "br-lan"
>> ./rc.local: 23: ./rc.local: cannot create /proc/net/batman-adv/interfaces:
>> Directory nonexistent
>> ./rc.local: 24: ./rc.local: cannot create /proc/net/batman-adv/interfaces:
>> Directory nonexistent
>> ./rc.local: 25: ./rc.local: cannot create /proc/net/batman-adv/log_level:
>> Directory nonexistent
>> /tmp/logserver.sh: 1: /tmp/logserver.sh: !/bin/sh: not found
>> Cannot find device "bat0"
>> Cannot find device "bat0"
>>
>> Next, I have patched both 'vde2-2.3.2_colour.patch' and
>> 'vde2-2.3.2-wirefilter-ethertype.patch'
>>
>> The final step lists a script for running the scripts to start up all the
>> qemu windows. This throw up a lot many errors.
>> Below is the error it shows:
>>
>> kaushik@kaushik-HP:~/QEMUopenwrt$ ./command.sh
>> Must be run inside a screen session
>> [sudo] password for kaushik:
>> wirefilter(8722): Operation not permitted
>> wirefilter(8724): Operation not permitted
>> wirefilter(8726): Operation not permitted
>> wirefilter(8728): Operation not permitted
>> wirefilter(8730): Operation not permitted
>> wirefilter(8732): Operation not permitted
>> wirefilter(8734): Operation not permitted
>> wirefilter(8736): Operation not permitted
>> wirefilter(8738): Operation not permitted
>> wirefilter(8740): Operation not permitted
>> wirefilter(8742): Operation not permitted
>> wirefilter(8744): Operation not permitted
>> wirefilter(8746): Operation not permitted
>> wirefilter(8748): Operation not permitted
>> wirefilter(8750): Operation not permitted
>> vde_switch(8567): Operation not permitted
>> vde_switch(8575): Operation not permitted
>> vde_switch(8583): Operation not permitted
>> vde_switch(8591): Operation not permitted
>> vde_switch(8599): Operation not permitted
>> vde_switch(8607): Operation not permitted
>> vde_switch(8615): Operation not permitted
>> vde_switch(8623): Operation not permitted
>> vde_switch(8631): Operation not permitted
>> ioctl(TUNSETIFF): Device or resource busy
>> RTNETLINK answers: File exists
>> ioctl(TUNSETIFF): Device or resource busy
>> RTNETLINK answers: File exists
>> ioctl(TUNSETIFF): Device or resource busy
>> RTNETLINK answers: File exists
>> ioctl(TUNSETIFF): Device or resource busy
>> RTNETLINK answers: File exists
>> ioctl(TUNSETIFF): Device or resource busy
>> RTNETLINK answers: File exists
>> ioctl(TUNSETIFF): Device or resource busy
>> .
>> .
>> .
>>
>> This I run in a screen as it is mentioned in the guide. It creates many
>> files and folders named num0 to num9, but doesn't proceed after that.
>>
>>
>> This and some more experimentation I have done with it. So, any help I can
>> get would be most welcome
>>
>>
>> Thanks and Regards,
>>
>> Kaushik NP
>> LI | Tw | FB
>> SAP Ambassador,
>> General Secretary, Computer Society
>> Team IEEE UVCE,
>> 3rd Year Undergraduate Student,
>> University Visvesvaraya College of Engineering,
>> Bangalore, IN
>>
>> On Thu, Oct 6, 2016 at 8:39 PM, Ufo <ufo@rund.freifunk.net> wrote:
>>>
>>> Testing batman-adv in virtual maschines on laptops is the most complex and
>>> non-realistic way to start with mesh-networking. So its a nice, very
>>> demanding student thing.
>>>
>>> its much more easier to buy some (more than 2!!) cheap wifi-routers! they
>>> have proper wifi, more than one ethernet-interface (!) and there are many
>>> openwrt/lede mesh firmwares with a well-configured batman-adv. after that,
>>> the next step could be to try to couple your first laptop into that mesh.
>>> starting with nothing but laptops seems to be too "versatile".
>>>
>>> if you are unfamiliar with qemu and virtualization your should first try
>>> to install ubuntu or windows in a virtual machine. please use
>>> "virt-manager", a graphical interface for that.
>>>
>>> unfortunatly the mentioned "stable" openwrt was forced to use a very old
>>> batman-adv version from 2014. So you might use trunk firmware, and use LEDE
>>> instead of Openwrt, to have a proper system.
>>>
>>>
>>> http://ftp.halifax.rwth-aachen.de/lede/snapshots/targets/x86/generic/lede-x86-generic-combined-ext4.img.gz
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 04.10.2016 12:11, Kaushik N P wrote:
>>>>
>>>> Hello,
>>>>
>>>> Thank you 'rise.net' for the suggestion. It has given me some ideas,
>>>> but what I hoped to do was to run the laptop with OpenWRT working with
>>>> Batman adv like a router. This would enable me in creating a more
>>>> extensive network without having to buy more routers itself and
>>>> hopefully provide me with a more versatile network to work on. I will
>>>> ofcourse be experimenting more along your steps, but I hope to get the
>>>> QEMU set up and running on my system.
>>>>
>>>> If any one has more info on the QEMU setup, pls do contact.
>>>>
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Kaushik NP
>>>> General Secretary, Computer Society
>>>> Team IEEE UVCE,
>>>> 3rd Year Undergraduate Student,
>>>> University Visvesvaraya College of Engineering,
>>>> Bangalore, IN
>>>>
>>>>
>>>> On Mon, Oct 3, 2016 at 10:38 PM,  <leftbydefault@riseup.net> wrote:
>>>>>
>>>>> Hello Kaushik
>>>>>
>>>>> On 2016-10-03 19:44, Kaushik N P wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> What I hope to find is:-
>>>>>>
>>>>>> Another documentation maybe for setting up, or confirmation for
>>>>>> setting up (because I can't tell sometimes if the instructions have
>>>>>> been followed correctly).
>>>>>
>>>>>
>>>>> I have no experience in simulating or emulating batman-adv, but I have
>>>>> experience
>>>>> in compiling openwrt from source along with batman-adv and batctl. I can
>>>>> help you with that. batman-adv is built as a kernel module and so it is
>>>>> included by default in Linux kernels >= 2.x. You have mentioned that you
>>>>> are
>>>>> using Linux based operating system, I hope by now, you should be running
>>>>> Linux kernel 4.x. If you want to play around with batman-adv for
>>>>> sometime
>>>>> before emulating, you can use two three Linux based laptops with WiFi
>>>>> interface cards that support IBSS (adhoc mode).
>>>>>
>>>>> You can check that using
>>>>>
>>>>>      iw list | grep IBSS
>>>>>
>>>>> if the command returned something like
>>>>> Device supports RSN-IBSS.
>>>>>                   * IBSS
>>>>>
>>>>> then your Wireless NIC can be switched to ad-hoc mode. We have a bash
>>>>> shell
>>>>> script that does it automatically for you. You can find the script and
>>>>> terminal cast in the following links.
>>>>>
>>>>>   1. https://github.com/PYMeshnet/scripts
>>>>>   2. https://asciinema.org/a/38575
>>>>>
>>>>>> Clarification for my doubt regarding the different types of OpenWRT
>>>>>> images (like Kamikaze, Chaos Calmer, Attitude Adjustment,etc), what do
>>>>>> they do and which one I should use for working with standard Batman
>>>>>> adv setup.
>>>>>
>>>>>
>>>>> Chaos Calmer (15.x) is the recent stable release of OpenWRT firmware.
>>>>> 'Kamikaze, Altitude Adjustment, etc.,' are just different names given to
>>>>> different versions of OpenWRT releases. OpenWRT are meant to be the
>>>>> operating system for routers and modems. Depending on the configuration
>>>>> of
>>>>> devices, some versions may be supported and some may not be supported on
>>>>> certain routers and modems.
>>>>>
>>>>> Since you are trying to create a virtual environment, I think should go
>>>>> with
>>>>> Chaos Calmer. (again I have no experience either with creating a virtual
>>>>> environment for OpenWRT nor for batman-adv).
>>>>>
>>>>>
>>>>>> Confirmation method to see if qemu having OpenWRT is setup in my
>>>>>> system - as now I have a setup in terminal which says
>>>>>>
>>>>>> BusyBox v1.24.2 () built-in shell (ash)
>>>>>>
>>>>>> //Says OpenWrt below
>>>>>>    _______                     ________        __
>>>>>>   |            | .-----.-----.-----.|  |  |  |.----.|  |_
>>>>>>   |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
>>>>>>   |_______| |  __|____|__|__||________||__|  |____|
>>>>>>                  |__| W I R E L E S S   F R E E D O M
>>>>>>   -----------------------------------------------------
>>>>>>   DESIGNATED DRIVER (Bleeding Edge, 49928)
>>>>>>   -----------------------------------------------------
>>>>>>    * 2 oz. Orange Juice         Combine all juices in a
>>>>>>    * 2 oz. Pineapple Juice      tall glass filled with
>>>>>>    * 2 oz. Grapefruit Juice     ice, stir well.
>>>>>>    * 2 oz. Cranberry Juice
>>>>>>   -----------------------------------------------------
>>>>>> root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
>>>>>> identified at 0xf0b40000, IRQ: 60
>>>>>> [   13.934741] device eth0 entered promiscuous mode
>>>>>> [   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
>>>>>> [   15.762764] br-lan: port 1(eth0) entered forwarding state
>>>>>> [   15.764526] br-lan: port 1(eth0) entered forwarding state
>>>>>> [   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes
>>>>>> ready
>>>>>> [   17.762480] br-lan: port 1(eth0) entered forwarding state
>>>>>> root@OpenWrt:/#
>>>>>>
>>>>>>
>>>>>> I have more doubts, but hopefully, I will get some answers to them
>>>>>> from the above questions itself.
>>>>>> Hope to hear soon!!!
>>>>>>
>>>>>> Thanks and Regards,
>>>>>>
>>>>>> Kaushik NP
>>>>>> LI | Tw | FB
>>>>>> SAP Ambassador,
>>>>>> General Secretary, Computer Society
>>>>>> Team IEEE UVCE,
>>>>>> 3rd Year Undergraduate Student,
>>>>>> University Visvesvaraya College of Engineering,
>>>>>> Bangalore, IN
>>>>>
>>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
  2016-10-08  3:22           ` jmh8
@ 2016-10-10 15:21             ` Kaushik N P
  2016-10-10 15:47               ` jmh8
  0 siblings, 1 reply; 14+ messages in thread
From: Kaushik N P @ 2016-10-10 15:21 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Hello,

@jmh8, sorry for the late reply.Your mail has put my perspectives in
order regarding the hardware domain and its implications . Did some
Googling for I didn't know some of the terms you used (embarrassing,
yes. But I did learn new stuff, so evens out). I had heard of Roofnet
but not given much thought to the topic itself. It looks to be an
interesting concept to look into. But for now, I'll be concentrating
on the BATMAN adv setup on qemu itself. Again, good luck with your
Experimentation and hopefully you would build something that stops
that corporate war as you say.

I am beginning to wonder if qemu is the best environment to set up in.
If any one has more info, pls do let me know.

Thanks and Regards,
Kaushik

Thanks and Regards,

Kaushik NP
LI | Tw | FB
SAP Ambassador,
General Secretary, Computer Society
Team IEEE UVCE,
3rd Year Undergraduate Student,
University Visvesvaraya College of Engineering,
Bangalore, IN


On Sat, Oct 8, 2016 at 8:52 AM,  <jmh8@nhfn.net> wrote:
>
> Hi Kaushik N P,
>
>    I too have been experimenting with mesh. Another wrinkle comes from there
> being no really open standard for RF mesh operation. So meshes ONLY work
> well if a given manufacturer's chips are used. In other words having a
> really open RF specification has yet to be done. GSM probably comes closest
> to a real useful open RF specification.
>
>    My guess is that this will be by far the biggest problem you face. The
> software part is as you suggest easy. But having or creating really good RF
> test equipment and techniques will be THE problem.
>
>    So the war right now is in the RF insides of the various chips all of
> which are corporate secrets.
>
>    Perhaps you can find some combination of some fast fpgas and some well
> documented RF chip building blocks that will help. I have been wondering
> what this might be? As far as I know, ADCs and DACs that are directly useful
> at 2.4 and 5GHZ have yet to become available.
>
>    If it is still on the web, you might check out MITs roof net project.
> Some of that data is pretty interesting.
>
>    If my recently purchased $10USD 3G telephone were an open design, I could
> perhaps reprogram it?
>
>    Just my thoughts.
>
>    Good luck with your efforts.
>
>    John
>
>
>
> On Sat, 8 Oct 2016, Kaushik N P wrote:
>
>> Hello,
>>
>> Good to hear it is tough to work on in Linux and that am not the only
>> person finding it difficult working on it.
>>
>> @Ufo : Yes, it might be tough, but we learn from experience on working
>> on such stuff after all. I have two routers but want to setup a bigger
>> mesh bed with more nodes and would prefer not to spend more for now.
>> And mainly I think working on Linux would provide me a better
>> understanding and would allow me to experiment more on it. I have
>> worked with Virtual machines before, though with minimal
>> experimentation at that. And I will definitely check out LEDE. Thank
>> you for the suggestion.
>>
>> @Marek : Yes, I know it was a half baked question I presented, but
>> wasn't sure how to put up my query more clearly. Now I will list out
>> the steps I have followed till now and what the results are.
>>
>> Links I followed primarily:
>> [1] https://wiki.openwrt.org/doc/howto/qemu
>> [2] https://www.open-mesh.org/projects/open-mesh/wiki/Emulation
>>
>> So, the link [1] defines setting up QEMU. Again, I am working on
>> Ubuntu 16.0, 64-bit.
>>
>> As far as I could see, only the Commands in  'Booting from SD card
>> image' was related. Have downloaded openwrt-realview-vmlinux.elf ,
>> openwrt-realview-sdcard.img and type in the command below :
>>
>> qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
>>    -kernel openwrt-realview-vmlinux.elf \
>>    -sd openwrt-realview-sdcard.img \
>>    -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"
>>
>>
>> This command opened up a BusyBox which looks as follows :
>>
>> BusyBox v1.24.2 () built-in shell (ash)
>>
>> //Says OpenWrt below
>>  _______                     ________        __
>> |            | .-----.-----.-----.|  |  |  |.----.|  |_
>> |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
>> |_______| |  __|____|__|__||________||__|  |____|
>>                |__| W I R E L E S S   F R E E D O M
>> -----------------------------------------------------
>> DESIGNATED DRIVER (Bleeding Edge, 49928)
>> -----------------------------------------------------
>>  * 2 oz. Orange Juice         Combine all juices in a
>>  * 2 oz. Pineapple Juice      tall glass filled with
>>  * 2 oz. Grapefruit Juice     ice, stir well.
>>  * 2 oz. Cranberry Juice
>> -----------------------------------------------------
>> root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
>> identified at 0xf0b40000, IRQ: 60
>> [   13.934741] device eth0 entered promiscuous mode
>> [   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
>> [   15.762764] br-lan: port 1(eth0) entered forwarding state
>> [   15.764526] br-lan: port 1(eth0) entered forwarding state
>> [   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
>> [   17.762480] br-lan: port 1(eth0) entered forwarding state
>> root@OpenWrt:/#
>>
>> There is no details on what to do once this opens up though. And I
>> still need confirmation as to what this means. Is it that QEMU has
>> loaded OpenWRT in my system like a virtual machine or is it a console
>> to access OpenWRT functionalities, etc.
>>
>> After this I made changes according to "openwrt virtualized using
>> debian, qemu/kvm and a lex twitter system with intel atom d525 and
>> chipset ich8m" section to 'Virtualization proper' too in case it was
>> required, but the Virtualization didn't work.
>>
>>
>> This done, I moved to link [2], where it explains how to set up mesh
>> testbed. It says"OpenWrt, kamikaze trunk version for x86 with minimal
>> modifications" and so I have downloaded 'openwrt-x86-ext2.image' from
>> Kamikaze. Changed the above code used to load QEMU as :
>> qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
>>>
>>>     -kernel openwrt-realview-vmlinux.elf \
>>>     -sd openwrt- \
>>>     -sd openwrt-x86-ext2.image \
>>>     -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"
>>
>>
>> But loading this hasn't been successful as doing this gives :
>> ...<loading and stuff>...
>> [    1.304028] VFS: Mounted root (ext2 filesystem) readonly on device
>> 179:1.
>> [    1.317832] Freeing unused kernel memory: 196K (c0481000 - c04b2000)
>> [    1.328078] Kernel panic - not syncing: No working init found.  Try
>> passing init= option to kernel. See Linux Documentation/init.txt for
>> guidance.
>> [    1.332338] ---[ end Kernel panic - not syncing: No working init
>> found.  Try passing init= option to kernel. See Linux
>> Documentation/init.txt for guidance.
>>
>>
>> Next, running the script written in 'OpenWrt' section doesn't work as it
>> says :
>> /tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
>> /sys/kernel/debug/batman_adv/bat0/log: No such file
>> /tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
>> /sys/kernel/debug/batman_adv/bat0/log: No such file
>>
>> Commenting the lines that open this file :
>> while [ 1 ]; do
>>    nc -l -p 2050 < /sys/kernel/debug/batman_adv/bat0/log
>> done
>>
>> gives the error :
>> RTNETLINK answers: File exists
>> Cannot find device "br-lan"
>> Cannot find device "br-lan"
>> ./rc.local: 23: ./rc.local: cannot create
>> /proc/net/batman-adv/interfaces: Directory nonexistent
>> ./rc.local: 24: ./rc.local: cannot create
>> /proc/net/batman-adv/interfaces: Directory nonexistent
>> ./rc.local: 25: ./rc.local: cannot create
>> /proc/net/batman-adv/log_level: Directory nonexistent
>> /tmp/logserver.sh: 1: /tmp/logserver.sh: !/bin/sh: not found
>> Cannot find device "bat0"
>> Cannot find device "bat0"
>>
>> Next, I have patched both 'vde2-2.3.2_colour.patch' and
>> 'vde2-2.3.2-wirefilter-ethertype.patch'
>>
>> The final step lists a script for running the scripts to start up all
>> the qemu windows. This throw up a lot many errors.
>> Below is the error it shows:
>>
>> kaushik@kaushik-HP:~/QEMUopenwrt$ ./command.sh
>> Must be run inside a screen session
>> [sudo] password for kaushik:
>> wirefilter(8722): Operation not permitted
>> wirefilter(8724): Operation not permitted
>> wirefilter(8726): Operation not permitted
>> wirefilter(8728): Operation not permitted
>> wirefilter(8730): Operation not permitted
>> wirefilter(8732): Operation not permitted
>> wirefilter(8734): Operation not permitted
>> wirefilter(8736): Operation not permitted
>> wirefilter(8738): Operation not permitted
>> wirefilter(8740): Operation not permitted
>> wirefilter(8742): Operation not permitted
>> wirefilter(8744): Operation not permitted
>> wirefilter(8746): Operation not permitted
>> wirefilter(8748): Operation not permitted
>> wirefilter(8750): Operation not permitted
>> vde_switch(8567): Operation not permitted
>> vde_switch(8575): Operation not permitted
>> vde_switch(8583): Operation not permitted
>> vde_switch(8591): Operation not permitted
>> vde_switch(8599): Operation not permitted
>> vde_switch(8607): Operation not permitted
>> vde_switch(8615): Operation not permitted
>> vde_switch(8623): Operation not permitted
>> vde_switch(8631): Operation not permitted
>> ioctl(TUNSETIFF): Device or resource busy
>> RTNETLINK answers: File exists
>> ioctl(TUNSETIFF): Device or resource busy
>> RTNETLINK answers: File exists
>> ioctl(TUNSETIFF): Device or resource busy
>> RTNETLINK answers: File exists
>> ioctl(TUNSETIFF): Device or resource busy
>> RTNETLINK answers: File exists
>> ioctl(TUNSETIFF): Device or resource busy
>> RTNETLINK answers: File exists
>> ioctl(TUNSETIFF): Device or resource busy
>> .
>> .
>> .
>>
>> This I run in a screen as it is mentioned in the guide. It creates
>> many files and folders named num0 to num9, but doesn't proceed after
>> that.
>>
>>
>> This and some more experimentation I have done with it. So, any help I
>> can get would be most welcome
>>
>> Thanks and Regards,
>>
>> Kaushik NP
>> LI | Tw | FB
>> SAP Ambassador,
>> General Secretary, Computer Society
>> Team IEEE UVCE,
>> 3rd Year Undergraduate Student,
>> University Visvesvaraya College of Engineering,
>> Bangalore, IN
>>
>>
>> On Sat, Oct 8, 2016 at 1:21 AM, Kaushik N P <kaushik.np.in@ieee.org>
>> wrote:
>>>
>>> Hello,
>>>
>>> Good to hear it is tough to work on in Linux and that am not the only
>>> person
>>> finding it difficult working on it.
>>>
>>> @Ufo : Yes, it might be tough, but we learn from experience on working on
>>> such stuff after all. I have two routers but want to setup a bigger mesh
>>> bed
>>> with more nodes and would prefer not to spend more for now. And mainly I
>>> think working on Linux would provide me a better understanding and would
>>> allow me to experiment more on it. I have worked with Virtual machines
>>> before, though with minimal experimentation at that. And I will
>>> definitely
>>> check out LEDE. Thank you for the suggestion.
>>>
>>> @Marek : Yes, I know it was a half baked question I presented, but wasn't
>>> sure how to put up my query more clearly. Now I will list out the steps I
>>> have followed till now and what the results are.
>>>
>>> Links I followed primarily:
>>> [1] https://wiki.openwrt.org/doc/howto/qemu
>>> [2] https://www.open-mesh.org/projects/open-mesh/wiki/Emulation
>>>
>>> So, the link [1] defines setting up QEMU. Again, I am working on Ubuntu
>>> 16.0, 64-bit.
>>>
>>> As far as I could see, only the Commands in  'Booting from SD card image'
>>> was related. Have downloaded openwrt-realview-vmlinux.elf ,
>>> openwrt-realview-sdcard.img and type in the command below :
>>>
>>> qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
>>>     -kernel openwrt-realview-vmlinux.elf \
>>>     -sd openwrt-realview-sdcard.img \
>>>     -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"
>>>
>>>
>>> This command opened up a BusyBox which looks as follows :
>>>
>>> BusyBox v1.24.2 () built-in shell (ash)
>>>
>>> //Says OpenWrt below
>>>   _______                     ________        __
>>>  |            | .-----.-----.-----.|  |  |  |.----.|  |_
>>>  |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
>>>  |_______| |  __|____|__|__||________||__|  |____|
>>>                 |__| W I R E L E S S   F R E E D O M
>>>  -----------------------------------------------------
>>>  DESIGNATED DRIVER (Bleeding Edge, 49928)
>>>  -----------------------------------------------------
>>>   * 2 oz. Orange Juice         Combine all juices in a
>>>   * 2 oz. Pineapple Juice      tall glass filled with
>>>   * 2 oz. Grapefruit Juice     ice, stir well.
>>>   * 2 oz. Cranberry Juice
>>>  -----------------------------------------------------
>>> root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0: SMSC911x/921x
>>> identified at 0xf0b40000, IRQ: 60
>>> [   13.934741] device eth0 entered promiscuous mode
>>> [   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
>>> [   15.762764] br-lan: port 1(eth0) entered forwarding state
>>> [   15.764526] br-lan: port 1(eth0) entered forwarding state
>>> [   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
>>> [   17.762480] br-lan: port 1(eth0) entered forwarding state
>>> root@OpenWrt:/#
>>>
>>> There is no details on what to do once this opens up though. And I still
>>> need confirmation as to what this means. Is it that QEMU has loaded
>>> OpenWRT
>>> in my system like a virtual machine or is it a console to access OpenWRT
>>> functionalities, etc.
>>>
>>> After this I made changes according to "openwrt virtualized using debian,
>>> qemu/kvm and a lex twitter system with intel atom d525 and chipset ich8m"
>>> section to 'Virtualization proper' too in case it was required, but the
>>> Virtualization didn't work.
>>>
>>>
>>> This done, I moved to link [2], where it explains how to set up mesh
>>> testbed. It says"OpenWrt, kamikaze trunk version for x86 with minimal
>>> modifications" and so I have downloaded 'openwrt-x86-ext2.image' from
>>> Kamikaze. Changed the above code used to load QEMU as :
>>> qemu-system-arm -M realview-pbx-a9 -m 1024M -nographic \
>>>>
>>>>     -kernel openwrt-realview-vmlinux.elf \
>>>>     -sd openwrt- \
>>>>     -sd openwrt-x86-ext2.image \
>>>>     -append "console=ttyAMA0 verbose debug root=/dev/mmcblk0p1"
>>>
>>>
>>> But loading this hasn't been successful as doing this gives :
>>> ...<loading and stuff>...
>>> [    1.304028] VFS: Mounted root (ext2 filesystem) readonly on device
>>> 179:1.
>>> [    1.317832] Freeing unused kernel memory: 196K (c0481000 - c04b2000)
>>> [    1.328078] Kernel panic - not syncing: No working init found.  Try
>>> passing init= option to kernel. See Linux Documentation/init.txt for
>>> guidance.
>>> [    1.332338] ---[ end Kernel panic - not syncing: No working init
>>> found.
>>> Try passing init= option to kernel. See Linux Documentation/init.txt for
>>> guidance.
>>>
>>>
>>> Next, running the script written in 'OpenWrt' section doesn't work as it
>>> says :
>>> /tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
>>> /sys/kernel/debug/batman_adv/bat0/log: No such file
>>> /tmp/logserver.sh: 3: /tmp/logserver.sh: cannot open
>>> /sys/kernel/debug/batman_adv/bat0/log: No such file
>>>
>>> Commenting the lines that open this file :
>>> while [ 1 ]; do
>>>     nc -l -p 2050 < /sys/kernel/debug/batman_adv/bat0/log
>>> done
>>>
>>> gives the error :
>>> RTNETLINK answers: File exists
>>> Cannot find device "br-lan"
>>> Cannot find device "br-lan"
>>> ./rc.local: 23: ./rc.local: cannot create
>>> /proc/net/batman-adv/interfaces:
>>> Directory nonexistent
>>> ./rc.local: 24: ./rc.local: cannot create
>>> /proc/net/batman-adv/interfaces:
>>> Directory nonexistent
>>> ./rc.local: 25: ./rc.local: cannot create /proc/net/batman-adv/log_level:
>>> Directory nonexistent
>>> /tmp/logserver.sh: 1: /tmp/logserver.sh: !/bin/sh: not found
>>> Cannot find device "bat0"
>>> Cannot find device "bat0"
>>>
>>> Next, I have patched both 'vde2-2.3.2_colour.patch' and
>>> 'vde2-2.3.2-wirefilter-ethertype.patch'
>>>
>>> The final step lists a script for running the scripts to start up all the
>>> qemu windows. This throw up a lot many errors.
>>> Below is the error it shows:
>>>
>>> kaushik@kaushik-HP:~/QEMUopenwrt$ ./command.sh
>>> Must be run inside a screen session
>>> [sudo] password for kaushik:
>>> wirefilter(8722): Operation not permitted
>>> wirefilter(8724): Operation not permitted
>>> wirefilter(8726): Operation not permitted
>>> wirefilter(8728): Operation not permitted
>>> wirefilter(8730): Operation not permitted
>>> wirefilter(8732): Operation not permitted
>>> wirefilter(8734): Operation not permitted
>>> wirefilter(8736): Operation not permitted
>>> wirefilter(8738): Operation not permitted
>>> wirefilter(8740): Operation not permitted
>>> wirefilter(8742): Operation not permitted
>>> wirefilter(8744): Operation not permitted
>>> wirefilter(8746): Operation not permitted
>>> wirefilter(8748): Operation not permitted
>>> wirefilter(8750): Operation not permitted
>>> vde_switch(8567): Operation not permitted
>>> vde_switch(8575): Operation not permitted
>>> vde_switch(8583): Operation not permitted
>>> vde_switch(8591): Operation not permitted
>>> vde_switch(8599): Operation not permitted
>>> vde_switch(8607): Operation not permitted
>>> vde_switch(8615): Operation not permitted
>>> vde_switch(8623): Operation not permitted
>>> vde_switch(8631): Operation not permitted
>>> ioctl(TUNSETIFF): Device or resource busy
>>> RTNETLINK answers: File exists
>>> ioctl(TUNSETIFF): Device or resource busy
>>> RTNETLINK answers: File exists
>>> ioctl(TUNSETIFF): Device or resource busy
>>> RTNETLINK answers: File exists
>>> ioctl(TUNSETIFF): Device or resource busy
>>> RTNETLINK answers: File exists
>>> ioctl(TUNSETIFF): Device or resource busy
>>> RTNETLINK answers: File exists
>>> ioctl(TUNSETIFF): Device or resource busy
>>> .
>>> .
>>> .
>>>
>>> This I run in a screen as it is mentioned in the guide. It creates many
>>> files and folders named num0 to num9, but doesn't proceed after that.
>>>
>>>
>>> This and some more experimentation I have done with it. So, any help I
>>> can
>>> get would be most welcome
>>>
>>>
>>> Thanks and Regards,
>>>
>>> Kaushik NP
>>> LI | Tw | FB
>>> SAP Ambassador,
>>> General Secretary, Computer Society
>>> Team IEEE UVCE,
>>> 3rd Year Undergraduate Student,
>>> University Visvesvaraya College of Engineering,
>>> Bangalore, IN
>>>
>>> On Thu, Oct 6, 2016 at 8:39 PM, Ufo <ufo@rund.freifunk.net> wrote:
>>>>
>>>>
>>>> Testing batman-adv in virtual maschines on laptops is the most complex
>>>> and
>>>> non-realistic way to start with mesh-networking. So its a nice, very
>>>> demanding student thing.
>>>>
>>>> its much more easier to buy some (more than 2!!) cheap wifi-routers!
>>>> they
>>>> have proper wifi, more than one ethernet-interface (!) and there are
>>>> many
>>>> openwrt/lede mesh firmwares with a well-configured batman-adv. after
>>>> that,
>>>> the next step could be to try to couple your first laptop into that
>>>> mesh.
>>>> starting with nothing but laptops seems to be too "versatile".
>>>>
>>>> if you are unfamiliar with qemu and virtualization your should first try
>>>> to install ubuntu or windows in a virtual machine. please use
>>>> "virt-manager", a graphical interface for that.
>>>>
>>>> unfortunatly the mentioned "stable" openwrt was forced to use a very old
>>>> batman-adv version from 2014. So you might use trunk firmware, and use
>>>> LEDE
>>>> instead of Openwrt, to have a proper system.
>>>>
>>>>
>>>>
>>>> http://ftp.halifax.rwth-aachen.de/lede/snapshots/targets/x86/generic/lede-x86-generic-combined-ext4.img.gz
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 04.10.2016 12:11, Kaushik N P wrote:
>>>>>
>>>>>
>>>>> Hello,
>>>>>
>>>>> Thank you 'rise.net' for the suggestion. It has given me some ideas,
>>>>> but what I hoped to do was to run the laptop with OpenWRT working with
>>>>> Batman adv like a router. This would enable me in creating a more
>>>>> extensive network without having to buy more routers itself and
>>>>> hopefully provide me with a more versatile network to work on. I will
>>>>> ofcourse be experimenting more along your steps, but I hope to get the
>>>>> QEMU set up and running on my system.
>>>>>
>>>>> If any one has more info on the QEMU setup, pls do contact.
>>>>>
>>>>>
>>>>> Thanks and Regards,
>>>>>
>>>>> Kaushik NP
>>>>> General Secretary, Computer Society
>>>>> Team IEEE UVCE,
>>>>> 3rd Year Undergraduate Student,
>>>>> University Visvesvaraya College of Engineering,
>>>>> Bangalore, IN
>>>>>
>>>>>
>>>>> On Mon, Oct 3, 2016 at 10:38 PM,  <leftbydefault@riseup.net> wrote:
>>>>>>
>>>>>>
>>>>>> Hello Kaushik
>>>>>>
>>>>>> On 2016-10-03 19:44, Kaushik N P wrote:
>>>>>>>
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> What I hope to find is:-
>>>>>>>
>>>>>>> Another documentation maybe for setting up, or confirmation for
>>>>>>> setting up (because I can't tell sometimes if the instructions have
>>>>>>> been followed correctly).
>>>>>>
>>>>>>
>>>>>>
>>>>>> I have no experience in simulating or emulating batman-adv, but I have
>>>>>> experience
>>>>>> in compiling openwrt from source along with batman-adv and batctl. I
>>>>>> can
>>>>>> help you with that. batman-adv is built as a kernel module and so it
>>>>>> is
>>>>>> included by default in Linux kernels >= 2.x. You have mentioned that
>>>>>> you
>>>>>> are
>>>>>> using Linux based operating system, I hope by now, you should be
>>>>>> running
>>>>>> Linux kernel 4.x. If you want to play around with batman-adv for
>>>>>> sometime
>>>>>> before emulating, you can use two three Linux based laptops with WiFi
>>>>>> interface cards that support IBSS (adhoc mode).
>>>>>>
>>>>>> You can check that using
>>>>>>
>>>>>>      iw list | grep IBSS
>>>>>>
>>>>>> if the command returned something like
>>>>>> Device supports RSN-IBSS.
>>>>>>                   * IBSS
>>>>>>
>>>>>> then your Wireless NIC can be switched to ad-hoc mode. We have a bash
>>>>>> shell
>>>>>> script that does it automatically for you. You can find the script and
>>>>>> terminal cast in the following links.
>>>>>>
>>>>>>   1. https://github.com/PYMeshnet/scripts
>>>>>>   2. https://asciinema.org/a/38575
>>>>>>
>>>>>>> Clarification for my doubt regarding the different types of OpenWRT
>>>>>>> images (like Kamikaze, Chaos Calmer, Attitude Adjustment,etc), what
>>>>>>> do
>>>>>>> they do and which one I should use for working with standard Batman
>>>>>>> adv setup.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Chaos Calmer (15.x) is the recent stable release of OpenWRT firmware.
>>>>>> 'Kamikaze, Altitude Adjustment, etc.,' are just different names given
>>>>>> to
>>>>>> different versions of OpenWRT releases. OpenWRT are meant to be the
>>>>>> operating system for routers and modems. Depending on the
>>>>>> configuration
>>>>>> of
>>>>>> devices, some versions may be supported and some may not be supported
>>>>>> on
>>>>>> certain routers and modems.
>>>>>>
>>>>>> Since you are trying to create a virtual environment, I think should
>>>>>> go
>>>>>> with
>>>>>> Chaos Calmer. (again I have no experience either with creating a
>>>>>> virtual
>>>>>> environment for OpenWRT nor for batman-adv).
>>>>>>
>>>>>>
>>>>>>> Confirmation method to see if qemu having OpenWRT is setup in my
>>>>>>> system - as now I have a setup in terminal which says
>>>>>>>
>>>>>>> BusyBox v1.24.2 () built-in shell (ash)
>>>>>>>
>>>>>>> //Says OpenWrt below
>>>>>>>    _______                     ________        __
>>>>>>>   |            | .-----.-----.-----.|  |  |  |.----.|  |_
>>>>>>>   |     -      | |  _  |  -__|    ||  |  |  ||   _||   _|
>>>>>>>   |_______| |  __|____|__|__||________||__|  |____|
>>>>>>>                  |__| W I R E L E S S   F R E E D O M
>>>>>>>   -----------------------------------------------------
>>>>>>>   DESIGNATED DRIVER (Bleeding Edge, 49928)
>>>>>>>   -----------------------------------------------------
>>>>>>>    * 2 oz. Orange Juice         Combine all juices in a
>>>>>>>    * 2 oz. Pineapple Juice      tall glass filled with
>>>>>>>    * 2 oz. Grapefruit Juice     ice, stir well.
>>>>>>>    * 2 oz. Cranberry Juice
>>>>>>>   -----------------------------------------------------
>>>>>>> root@OpenWrt:/# [   13.897119] smsc911x smsc911x.0 eth0:
>>>>>>> SMSC911x/921x
>>>>>>> identified at 0xf0b40000, IRQ: 60
>>>>>>> [   13.934741] device eth0 entered promiscuous mode
>>>>>>> [   13.978166] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
>>>>>>> [   15.762764] br-lan: port 1(eth0) entered forwarding state
>>>>>>> [   15.764526] br-lan: port 1(eth0) entered forwarding state
>>>>>>> [   15.802643] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes
>>>>>>> ready
>>>>>>> [   17.762480] br-lan: port 1(eth0) entered forwarding state
>>>>>>> root@OpenWrt:/#
>>>>>>>
>>>>>>>
>>>>>>> I have more doubts, but hopefully, I will get some answers to them
>>>>>>> from the above questions itself.
>>>>>>> Hope to hear soon!!!
>>>>>>>
>>>>>>> Thanks and Regards,
>>>>>>>
>>>>>>> Kaushik NP
>>>>>>> LI | Tw | FB
>>>>>>> SAP Ambassador,
>>>>>>> General Secretary, Computer Society
>>>>>>> Team IEEE UVCE,
>>>>>>> 3rd Year Undergraduate Student,
>>>>>>> University Visvesvaraya College of Engineering,
>>>>>>> Bangalore, IN
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>>
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
  2016-10-10 15:21             ` Kaushik N P
@ 2016-10-10 15:47               ` jmh8
  2016-10-10 15:58                 ` Kaushik N P
  0 siblings, 1 reply; 14+ messages in thread
From: jmh8 @ 2016-10-10 15:47 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking


Hi,

    I think there was a previous suggestion of a few [at least 3] routers.

    I find three is the minimum needed. Two to talk to each other and one 
to listen to the conversation. They are cheap enough!

    Emulating may make sense later, but timing problems due to emulation 
for real time stuff like this often create their own set of problems 
unrelated to what you are trying to do.

    Antennas up and in the clear also seem to be important.

    Just my opinions of course.

    Good luck.
    John

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
  2016-10-10 15:47               ` jmh8
@ 2016-10-10 15:58                 ` Kaushik N P
  2016-10-11 10:36                   ` Linus Lüssing
  0 siblings, 1 reply; 14+ messages in thread
From: Kaushik N P @ 2016-10-10 15:58 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

@ jmh8,

Ofcourse I had considered doing it with 3 routers. Sensible it may be
regarding mesh, but I don't think it is appropriate for a mesh
Environment. I feel the environment needs to be extensive and needs to
focus on being able to take bigger load now more than ever.

You mentioned : "timing problems due to emulation for real time stuff
like this often create their own set of problems unrelated to what you
are trying to do." I am not exactly sure what you meant by that, but
if it is related to something like connection problems or
interferences due to more number of devices, setting up more number of
nodes in the mesh would make sense then.

Ofcourse, this too is my idealogy and I have no proper  standards to go by.


But I hadn't considered testing with just 3 routers due to my own
opinion regarding a good mesh. If I could get a confirmation regarding
this and if it could be later on used as research paper material, I
would go ahead with that itself.


Thanks and Regards,

Kaushik NP
LI | Tw | FB
SAP Ambassador,
General Secretary, Computer Society
Team IEEE UVCE,
3rd Year Undergraduate Student,
University Visvesvaraya College of Engineering,
Bangalore, IN


On Mon, Oct 10, 2016 at 9:17 PM,  <jmh8@nhfn.net> wrote:
>
> Hi,
>
>    I think there was a previous suggestion of a few [at least 3] routers.
>
>    I find three is the minimum needed. Two to talk to each other and one to
> listen to the conversation. They are cheap enough!
>
>    Emulating may make sense later, but timing problems due to emulation for
> real time stuff like this often create their own set of problems unrelated
> to what you are trying to do.
>
>    Antennas up and in the clear also seem to be important.
>
>    Just my opinions of course.
>
>    Good luck.
>    John

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
  2016-10-10 15:58                 ` Kaushik N P
@ 2016-10-11 10:36                   ` Linus Lüssing
       [not found]                     ` <CAGghcR47zo=9+jiH8L1jMRMB23ZWSZu06KYVSnzdVFR7s3JLcQ@mail.gmail.com>
  0 siblings, 1 reply; 14+ messages in thread
From: Linus Lüssing @ 2016-10-11 10:36 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Haven't tried that myself yet, but maybe the new network namespace
support in the git master branch might be an easy alternative to
start with?

You could first try to compile and load the batman-adv
kernel module. Then you'd create a namespace for each virtual node
you want to have. Then you connect the namespace via veth-pairs.
And finally, within each network namespace you would hook some veth
ends into a batX interface.


First you could try wiring two, then three nodes manually. If
that works and looks good you could then write a script to setup
the testbed with an arbitrary amount of virtual nodes.

Regards, Linus

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
       [not found]                       ` <CAGghcR7d-xuSkj7Joard+JE2ug-yHvrAxCfJ0wYa6tdybw2Aeg@mail.gmail.com>
@ 2016-10-12 17:12                         ` Kaushik N P
  2016-10-12 17:46                           ` Linus Lüssing
  0 siblings, 1 reply; 14+ messages in thread
From: Kaushik N P @ 2016-10-12 17:12 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Hello,

@Linus, I am a bit new to this and haven't much exposure to compiling
kernels and all. I will try out and see what I can do with it, but a
little more explanation would help a lot.

"Then you connect the namespace via veth-pairs." Didn't get the
namespace and making veth-pairs part.

Anyways, I'll be certain to see what I can do with the code itself.

Thanks and regards,
Kaushik

Thanks and Regards,

Kaushik NP
LI | Tw | FB
SAP Ambassador,
General Secretary, Computer Society
Team IEEE UVCE,
3rd Year Undergraduate Student,
University Visvesvaraya College of Engineering,
Bangalore, IN


On Wed, Oct 12, 2016 at 10:19 PM, Kaushik N P <kaushik.np.in@ieee.org> wrote:
> Hello,
>
> @Linus, I am a bit new to this and haven't much exposure to compiling
> kernels and all. I will try out and see what I can do with it, but a little
> more explanation would help a lot.
>
> "Then you connect the namespace via veth-pairs." Didn't get the namespace
> and making veth-pairs part.
>
> Anyways, I'll be certain to see what I can do with the code itself.
>
> Thanks and regards,
> Kaushik
>
>
> On Oct 11, 2016 4:06 PM, "Linus Lüssing" <linus.luessing@c0d3.blue> wrote:
>
> Haven't tried that myself yet, but maybe the new network namespace
> support in the git master branch might be an easy alternative to
> start with?
>
> You could first try to compile and load the batman-adv
> kernel module. Then you'd create a namespace for each virtual node
> you want to have. Then you connect the namespace via veth-pairs.
> And finally, within each network namespace you would hook some veth
> ends into a batX interface.
>
>
> First you could try wiring two, then three nodes manually. If
> that works and looks good you could then write a script to setup
> the testbed with an arbitrary amount of virtual nodes.
>
> Regards, Linus
>
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
  2016-10-12 17:12                         ` Kaushik N P
@ 2016-10-12 17:46                           ` Linus Lüssing
  2016-10-12 18:04                             ` Linus Lüssing
  0 siblings, 1 reply; 14+ messages in thread
From: Linus Lüssing @ 2016-10-12 17:46 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

First result in my favorite search engine for "linux network
namespace":

http://blog.scottlowe.org/2013/09/04/introducing-linux-network-namespaces/

Extensively describes how to set up and use network namespaces
with veth.

Have fun :-).

Regards, Linus


On Wed, Oct 12, 2016 at 10:42:30PM +0530, Kaushik N P wrote:
> Hello,
> 
> @Linus, I am a bit new to this and haven't much exposure to compiling
> kernels and all. I will try out and see what I can do with it, but a
> little more explanation would help a lot.
> 
> "Then you connect the namespace via veth-pairs." Didn't get the
> namespace and making veth-pairs part.
> 
> Anyways, I'll be certain to see what I can do with the code itself.
> 
> Thanks and regards,
> Kaushik
> 
> Thanks and Regards,
> 
> Kaushik NP
> LI | Tw | FB
> SAP Ambassador,
> General Secretary, Computer Society
> Team IEEE UVCE,
> 3rd Year Undergraduate Student,
> University Visvesvaraya College of Engineering,
> Bangalore, IN
> 
> 
> On Wed, Oct 12, 2016 at 10:19 PM, Kaushik N P <kaushik.np.in@ieee.org> wrote:
> > Hello,
> >
> > @Linus, I am a bit new to this and haven't much exposure to compiling
> > kernels and all. I will try out and see what I can do with it, but a little
> > more explanation would help a lot.
> >
> > "Then you connect the namespace via veth-pairs." Didn't get the namespace
> > and making veth-pairs part.
> >
> > Anyways, I'll be certain to see what I can do with the code itself.
> >
> > Thanks and regards,
> > Kaushik
> >
> >
> > On Oct 11, 2016 4:06 PM, "Linus Lüssing" <linus.luessing@c0d3.blue> wrote:
> >
> > Haven't tried that myself yet, but maybe the new network namespace
> > support in the git master branch might be an easy alternative to
> > start with?
> >
> > You could first try to compile and load the batman-adv
> > kernel module. Then you'd create a namespace for each virtual node
> > you want to have. Then you connect the namespace via veth-pairs.
> > And finally, within each network namespace you would hook some veth
> > ends into a batX interface.
> >
> >
> > First you could try wiring two, then three nodes manually. If
> > that works and looks good you could then write a script to setup
> > the testbed with an arbitrary amount of virtual nodes.
> >
> > Regards, Linus
> >
> >

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv
  2016-10-12 17:46                           ` Linus Lüssing
@ 2016-10-12 18:04                             ` Linus Lüssing
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Lüssing @ 2016-10-12 18:04 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Actually, for some basic tests you could skip the netns part and
just use veth directly:

$ ip link add veth0 type veth peer name veth1
$ batctl -m bat0 if add veth0
$ batctl -m bat1 if add veth1
$ ip link set up dev veth0
$ ip link set up dev veth1
$ ip link set up dev bat0
$ ip link set up dev bat1

And then check with "batctl -m bat{0,1} originators" for instance.

Cheers, Linus


On Wed, Oct 12, 2016 at 07:46:46PM +0200, Linus Lüssing wrote:
> First result in my favorite search engine for "linux network
> namespace":
> 
> http://blog.scottlowe.org/2013/09/04/introducing-linux-network-namespaces/
> 
> Extensively describes how to set up and use network namespaces
> with veth.
> 
> Have fun :-).
> 
> Regards, Linus
> 
> 
> On Wed, Oct 12, 2016 at 10:42:30PM +0530, Kaushik N P wrote:
> > Hello,
> > 
> > @Linus, I am a bit new to this and haven't much exposure to compiling
> > kernels and all. I will try out and see what I can do with it, but a
> > little more explanation would help a lot.
> > 
> > "Then you connect the namespace via veth-pairs." Didn't get the
> > namespace and making veth-pairs part.
> > 
> > Anyways, I'll be certain to see what I can do with the code itself.
> > 
> > Thanks and regards,
> > Kaushik
> > 
> > Thanks and Regards,
> > 
> > Kaushik NP
> > LI | Tw | FB
> > SAP Ambassador,
> > General Secretary, Computer Society
> > Team IEEE UVCE,
> > 3rd Year Undergraduate Student,
> > University Visvesvaraya College of Engineering,
> > Bangalore, IN
> > 
> > 
> > On Wed, Oct 12, 2016 at 10:19 PM, Kaushik N P <kaushik.np.in@ieee.org> wrote:
> > > Hello,
> > >
> > > @Linus, I am a bit new to this and haven't much exposure to compiling
> > > kernels and all. I will try out and see what I can do with it, but a little
> > > more explanation would help a lot.
> > >
> > > "Then you connect the namespace via veth-pairs." Didn't get the namespace
> > > and making veth-pairs part.
> > >
> > > Anyways, I'll be certain to see what I can do with the code itself.
> > >
> > > Thanks and regards,
> > > Kaushik
> > >
> > >
> > > On Oct 11, 2016 4:06 PM, "Linus Lüssing" <linus.luessing@c0d3.blue> wrote:
> > >
> > > Haven't tried that myself yet, but maybe the new network namespace
> > > support in the git master branch might be an easy alternative to
> > > start with?
> > >
> > > You could first try to compile and load the batman-adv
> > > kernel module. Then you'd create a namespace for each virtual node
> > > you want to have. Then you connect the namespace via veth-pairs.
> > > And finally, within each network namespace you would hook some veth
> > > ends into a batX interface.
> > >
> > >
> > > First you could try wiring two, then three nodes manually. If
> > > that works and looks good you could then write a script to setup
> > > the testbed with an arbitrary amount of virtual nodes.
> > >
> > > Regards, Linus
> > >
> > >

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-10-12 18:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-03 14:14 [B.A.T.M.A.N.] Help in setting up mesh test bed using qemu - BATMAN adv Kaushik N P
2016-10-03 17:08 ` leftbydefault
2016-10-04 10:11   ` Kaushik N P
2016-10-06 15:09     ` Ufo
     [not found]       ` <CAGghcR7QjF+yugxao-P5YsB_TkC_0D_YU2tc0+dinN9AJhZX9w@mail.gmail.com>
2016-10-07 19:53         ` Kaushik N P
2016-10-08  3:22           ` jmh8
2016-10-10 15:21             ` Kaushik N P
2016-10-10 15:47               ` jmh8
2016-10-10 15:58                 ` Kaushik N P
2016-10-11 10:36                   ` Linus Lüssing
     [not found]                     ` <CAGghcR47zo=9+jiH8L1jMRMB23ZWSZu06KYVSnzdVFR7s3JLcQ@mail.gmail.com>
     [not found]                       ` <CAGghcR7d-xuSkj7Joard+JE2ug-yHvrAxCfJ0wYa6tdybw2Aeg@mail.gmail.com>
2016-10-12 17:12                         ` Kaushik N P
2016-10-12 17:46                           ` Linus Lüssing
2016-10-12 18:04                             ` Linus Lüssing
2016-10-06  1:28 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).