OpenWrt Forum Archive

Topic: adhoc mode guide

The content of this topic has been archived on 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
anyone could gently guide me into the configuration of three routers using adhoc mode.
I think to test at first the following linear topology:


A -------------------- B -------------------- C


Well, I think I could reach the result I need using default gateways (B is default gateway for A and C) and static routes (it is necessary for B).
My thoughts are right?

I am having some doubts in /etc/config/network and /etc/config/wireless configurations.

The SSID must be the same?
Should I remove bridges?
Should I to divide cable interfaces and wireles in two subnets?


Sorry if my english is too bad.
Thanks in advance.

Nobody uses pure adhoc mode any more.   You should look into mesh modes.  I've been using 802.11s, which is already completely in the kernel for most wireless drivers.  Unlike pure adhoc, mesh protocols keep track of which pairs of stations have direct connectivity, and which will need to relay through another one, and handles that automatically.

A basic configuration has the one router that has a wired connection to the Internet doing all the routing, NAT, and DHCP assignments.  The other ones are simple bridges from wired or AP users onto the mesh.

Dear mk24,
thank you very much for your answer.

I'm trying to configure a pure adhoc mode only for reasearch/documentation purposes.
I'm aware of mesh networks, OLSR, AODV, DSDV, BATMAN and other routing protocols.
By the way, OLSR and BATMAN are available for openwrt.

Anyway, sincerely thanks.

Could you please guide me how to configure a pure ad hoc?
I'm somewhat confused with /etc/config/network and /etc/config/wireless configuration.
(I'm novice in OpenWrt)

Thanks!

Juliano

Yes you set the same SSID on all.  This is how the adhoc node knows who is intended to be in its network, and who to ignore.  Also of course the RF channel has to be the same.

In /etc/config/wireless add a section like this:

config wifi-iface
    option device 'radio0'
        option mode 'adhoc'
        option ssid 'Openwrt'
        option encryption 'none'
    option network 'lan'

Some wireless hardware / drivers has limitations on whether you can have other modes (such as an AP) active on the same radio concurrently with an adhoc interface.

It would be simplest to start with a default configuration and add your adhoc interface into lan (as shown above).  lan is already a bridge, then you have one network all bridged together.  Make sure that STP is enabled because you will have loops.

Reference on things you can set in the config files:
http://wiki.openwrt.org/doc/uci/wireless
http://wiki.openwrt.org/doc/uci/network

(Last edited by mk24 on 10 Mar 2015, 05:43)

The discussion might have continued from here.