User avatar
forumr
Posts: 4
Joined: Wed May 13, 2015 8:50 pm

adhoc mesh network and routing protocols

Sat May 30, 2015 6:53 pm

hi,

I am planning a project using 4 Raspberry Pi's in an ad hoc mesh network. HW details:
  • 4x Raspberry Pi Model B ( Raspbian Debian Wheezy 3.18.7+ #755)
    4x Edimax EW-7811Un USB WiFi Adapter (RTL8188cus)
    1x Notebook for SSH access: Windows 8.1 Pro
Image



I'v configured /etc/network/interfaces to the following:
RPi1

Code: Select all

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
  address 192.168.1.21
  netmask 255.255.255.0
  wireless-channel 1
  wireless-essid RPiAdHocNetwork
  wireless-mode ad-hoc
RPi2

Code: Select all

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
  address 192.168.1.22
  netmask 255.255.255.0
  wireless-channel 1
  wireless-essid RPiAdHocNetwork
  wireless-mode ad-hoc
RPi3

Code: Select all

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
  address 192.168.1.23
  netmask 255.255.255.0
  wireless-channel 1
  wireless-essid RPiAdHocNetwork
  wireless-mode ad-hoc
RPI4

Code: Select all

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
  address 192.168.1.24
  netmask 255.255.255.0
  wireless-channel 1
  wireless-essid RPiAdHocNetwork
  wireless-mode ad-hoc
Notebook:

Code: Select all

IP: 192.168.1.20
Subnet: 255.255.255.0
Mode: Ad-hoc
I could ping between the Pi's successfully after adding the IP and MAC Addresses in the ARP list of each Pi.
However, I would like to setup an adhoc routing protocol on the Pi's so that each node will choose the best path to transport the packets.
I'v found the following ad hoc routing protocols:
  • The Better Approach To Mobile Adhoc Networking (B.A.T.M.A.N.)
    Babel
    OLSR
and many more....

does anybody has experience with setting up one of those protocols on RPi ? and how could those protocols be installed properly ?
Attachments
Mesh1.jpg
Mesh1.jpg (59.81 KiB) Viewed 7880 times

User avatar
DougieLawson
Posts: 38510
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: adhoc mesh network and routing protocols

Sat May 30, 2015 9:10 pm

I've not found any WiFi dongle/driver that supports running an ad-hoc network on a RPi. There lots that run as an infrastructure client (because that's normal) and quite a few that will run as an intrastructure access point. The RT5370 will even run in monitor mode, but none that run as ad-hoc.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
forumr
Posts: 4
Joined: Wed May 13, 2015 8:50 pm

Re: adhoc mesh network and routing protocols

Sun May 31, 2015 1:27 pm

DougieLawson wrote:I've not found any WiFi dongle/driver that supports running an ad-hoc network on a RPi. There lots that run as an infrastructure client (because that's normal) and quite a few that will run as an intrastructure access point. The RT5370 will even run in monitor mode, but none that run as ad-hoc.
I could ping between the Pis successfully in ad-hoc mode! the only thing is that I had to add the ip and mac address of each one pi in the arp list of the other 3 Pis. but this could be solved by writing a script.

my question is if anyone had ever tried to setup an ad hoc routing protocol on the RPi or if there is a useful source for it.

Tom_A
Posts: 272
Joined: Fri Dec 06, 2013 8:34 am

Re: adhoc mesh network and routing protocols

Mon Jun 01, 2015 12:57 am

DougieLawson wrote:I've not found any WiFi dongle/driver that supports running an ad-hoc network on a RPi. There lots that run as an infrastructure client (because that's normal) and quite a few that will run as an intrastructure access point. The RT5370 will even run in monitor mode, but none that run as ad-hoc.
I was able to get adhoc working with NetworkManager, unfortunately only with security turned off. Funny thing is while browsing through NetworkManager's website I did find a page saying how important it was to enable wifi security. :lol: :roll:

I was using a Panda Wireless 300Mb/s adaptor although I think it probably works with lots of others. Perhaps you could not find an adaptor that would work because you had not tried setting up without any security. I don't like the idea of setting up without security, so it's not terribly useful that I can get it to work. I've configured as wireless access point instead.

phwizard
Posts: 5
Joined: Sat Jun 27, 2015 10:08 am

Re: adhoc mesh network and routing protocols

Tue Aug 18, 2015 7:45 pm

Thanks forumr for this post as I was able to get my ad-hoc / mesh net working after trying so many things to no avail. Your suggestion with arp list helped in my case too: viewtopic.php?f=28&t=118259

Have you had any luck with routing protocols? I've installed OLSRD but it cannot even detect the neighbour 1-hop node. This is odd as olsrd can see neighbours when all connected to my internet router with standard wi-fi and dhcp settings.

Maybe we shall list mac addresses and IP manually in olsrd settings similar to how it's done with ARP but this kind of destroys half of mesh net value. There should be some way to enable discovery mechanism so that new nodes can join without their mac addresses 'hard-coded'.

swti6690
Posts: 2
Joined: Mon Nov 16, 2015 12:29 pm

Re: adhoc mesh network and routing protocols

Mon Nov 16, 2015 12:30 pm

A routing protocol detail how routers commune with each further, broadcast information that facilitates them to choose routes among any two swellings on a computer set-up. Routing algorithms conclude the precise alternative of the route.

http://www.whatisnetworking.net/what-is ... -it-works/

Khalid
Posts: 2
Joined: Wed Sep 05, 2018 1:49 am

Re: adhoc mesh network and routing protocols

Wed Sep 05, 2018 2:20 am

Did you get an answer I really need the way to do the routing. I really appreciate that.


Thanks!

Return to “Networking and servers”