[Commotion-discuss] Olsrd setup guide?

Ben West ben at gowasabi.net
Thu Jun 25 19:46:53 EDT 2015


Relevant OLSR documentation can be difficult to locate, since its
configuration is OS-dependent (e.g. Desktop linux vs OpenWRT).  The olsrd
devs themselves tend to focus just on the tool and not the platform where
it's being deployed.  My understanding is that Commotion itself will deploy
reasonable configuration to /etc/config/olsrd on its nodes, depending
gateway or repeater role.

Also, I've learned that minimal OLSR config is generally the best, leaving
default options in place wherever possible.

Here is the README about OLSR extensions, directly from olsr.org, which
tries to be OS-agnostic:
http://olsr.org/git/?p=olsrd.git;a=blob;f=README-Olsr-Extensions

Below is configuration I'm testing out on a mesh of 3 UBNT M5 nodes running
OpenWRT Chaos Calmer v46069, i.e. no Commotion or 3rd party elements.  The
OLSR parameters were borrowed from Freifunk Berlin (on the assumption they
have successfully deployed such on a large scale).  Also note that the
repeater nodes have configuration for non-existent "wan" interfaces, and
that the gateway node has no firewall restrictions on its (existent) wan
interface, since this is just a test mesh.

This setup works reasonably so far, with the specific exception of some
repeater nodes (but not all!) with 2 hops failing to build a functional
SmartGateway tunnel back to the gateway node, e.g. they get no route to the
outside.  The reason for this exception is thus far unknown to me, despite
some hair pulling.


*Gateway node ...*
*/etc/config/wireless:*
config wifi-device  radio0
        option type     mac80211
        option channel  36
        option hwmode   11a
        option path     'pci0000:00/0000:00:00.0'
        option htmode   HT20
        option 'country' 'US'
        option beacon_int '1000'
        option disabled 0

config wifi-iface wlan0
        option device   radio0
        option network  'mesh'
        option mode 'adhoc'
        option mcast_rate '12000'
        option ssid     MyMeshSSID
        option bssid '02:CA:FF:EE:BA:BE'
        option encryption 'psk2+aes'
        option key '...'


*/etc/config/network:*config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'

config interface 'smarttun'
        option ifname 'tunl0'
        option proto 'none'

config 'interface' 'mesh'
        option ifname  'wlan0'
        option 'proto' 'static'
        option 'ipaddr' '10.12.1.1'
        option 'netmask' '255.255.255.0'


*/etc/config/olsrd:*config olsrd
        option IpVersion '4'
        option FIBMetric 'flat'
        option AllowNoInt 'yes'
        option TcRedundancy '2'
        option NatThreshold '0.75'
        option LinkQualityAlgorithm 'etx_ffeth'
        option SmartGateway 'yes'
        option SmartGatewayThreshold '50'
        option Pollrate '0.1'
        option SmartGatewayUplink 'ipv4'

config 'LoadPlugin'
        option 'library' 'olsrd_arprefresh.so.0.1'

config 'LoadPlugin'
        option 'library' 'olsrd_dyn_gw.so.0.5'
        option 'HNA' '0.0.0.0 0.0.0.0'
        option Ping '8.8.8.8'
        option PingInterval '30'
        option PingCmd 'ping -c 1 -q %s'

config 'LoadPlugin'
        option 'library' 'olsrd_nameservice.so.0.3'
        option 'sighup_pid_file' '/var/run/dnsmasq.pid'
        option 'suffix' '.mesh'

config 'LoadPlugin'
        option 'library' 'olsrd_txtinfo.so.0.1'
        option 'port'   '2006'
        option 'Accept' '127.0.0.1'

config InterfaceDefaults
        option MidValidityTime '500.0'
        option TcInterval '2.0'
        option HnaValidityTime '125.0'
        option HelloValidityTime '125.0'
        option TcValidityTime '500.0'
        option Ip4Broadcast '255.255.255.255'
        option MidInterval '25.0'
        option HelloInterval '3.0'
        option HnaInterval '10.0'

config 'Interface'
        list 'interface' 'wan'
        option 'Mode' 'ether'

config 'Interface'
        list 'interface' 'mesh'
        option 'Mode' 'mesh'


*/etc/config/firewall:*config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT
        option disable_ipv6     1

config 'zone'
        option 'name' 'mesh'
        option 'network' 'mesh smarttun'
        option 'input' 'ACCEPT'
        option 'output' 'ACCEPT'
        option 'masq' '1'
        option 'forward' 'REJECT'

config zone
        option name             wan
        option network          'wan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT
        option masq             1
        option mtu_fix          1

config 'forwarding'
        option 'src' 'mesh'
        option 'dest' 'wan'

config 'forwarding'
        option 'src' 'mesh'
        option 'dest' 'mesh'

config 'forwarding'
        option 'src' 'wan'
        option 'dest' 'mesh'

config 'forwarding'
        option 'src' 'wan'
        option 'dest' 'wan'


*Repeater nodes ...*
*/etc/config/wireless: same as gateway node*


*/etc/config/network:*config interface loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

config interface wan
        option proto dhcp
        option type bridge

config 'interface' 'mesh'
        option ifname  'wlan0'
        option 'proto' 'static'
        option 'ipaddr' '10.12.1.X'
        option 'netmask' '255.255.255.0'

config interface lan
        option ifname eth0
        option type bridge
        option proto    static
        option 'dns' '208.67.222.222 208.67.220.220'
        option ipaddr   192.168.X.1
        option netmask  255.255.255.0

*/etc/config/olsrd: same as gateway node*

/etc/config/firewall:
config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT
        option disable_ipv6     1

config 'zone'
        option 'name' 'mesh'
        option 'network' 'mesh'
        option 'input' 'ACCEPT'
        option 'output' 'ACCEPT'
        option 'masq' '1'
        option 'forward' 'REJECT'

config zone
        option name             lan
        option network          'lan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT
        option masq     1

config zone
        option name             wan
        option network          'wan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT
        option masq             1

config 'forwarding'
        option 'src' 'wan'
        option 'dest' 'mesh'

config 'forwarding'
        option 'src' 'mesh'
        option 'dest' 'mesh'

config 'forwarding'
        option 'src' 'lan'
        option 'dest' 'mesh'

config 'forwarding'
        option 'src' 'mesh'
        option 'dest' 'lan'

config 'forwarding'
        option 'src' 'lan'
        option 'dest' 'lan'

On Tue, Jun 23, 2015 at 4:21 PM, Adam Longwill <adam.longwill at metamesh.org>
wrote:

> Does anyone have a guide or even just want to explain to setting up olsrd
> in openwrt?
>
> I'm trying to improve my personal understanding of the basic configuration
> required to build an olsr mesh with OpenWRT so I can better understand
> Commotion but I am finding it difficult to learn from videos in other
> languages or high level descriptions of olsr.
>
> I am simply trying to make two routers talk to each other- one is
> connected to the Internet and the other is sitting across the room. They
> are on the same meshing wireless network but I cannot find a straight
> forward basic setup tutorial anywhere.
>
> I'm sure we could all benefit from this discussion. So how about it? How
> does one set up a basic olsr mesh network to access the Internet between
> two routers on OpenWRT?
>
> I'll be happy to share my configs and describe what I've done.
>
> Adam Longwill
>
> _______________________________________________
> Commotion-discuss mailing list
> Commotion-discuss at lists.chambana.net
> https://lists.chambana.net/mailman/listinfo/commotion-discuss
>
>


-- 
Ben West
http://gowasabi.net
ben at gowasabi.net
314-246-9434
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-discuss/attachments/20150625/1e98b8fa/attachment.html>


More information about the Commotion-discuss mailing list