[Olsr-dev] Propagating a default gateway OLSRv2

Henning Rogge (spam-protected)
Thu Jul 7 08:27:04 CEST 2016


Hi,

first a question... could you see if olsrd2 in version 0.12.x works on
Android without changes? Android was one of the issues why I rewrote
the interface handling.

As you already guessed there are two ways to make an olsrd2 router to
announce a prefix (in your case the default route).

The first is described under "Deployments" in the wiki:
http://www.olsr.org/mediawiki/index.php/OLSR_network_deployments#olsrd2_2

[olsrv2]
      lan    0.0.0.0/0

The second one is the lan_import plugin, which can automatically grab
all route for a specific interface (or a different set of filters).

[lan_import=1]
     interface eth0


Henning

On Thu, Jul 7, 2016 at 12:33 AM, Peter Emanuel <(spam-protected)> wrote:
> I am working on a project that wants to use OLSR to extend the network to
> villages in emerging economies. It combines very low cost Raspberry PI’s
> running Linux using OLSR to build out a network backbone and Android devices
> that join the network to  run Android apps. The Android app that uses OLSR
> to achieve this was originally using Version 1 of the protocol. For many
> good reasons, Version 2 is desired. When using version 1, HNA was utilized
> for a particular node to alert other nodes that it could use this node to
> route packets to the Internet. A device that has the WiFi connected to the
> OLSR adhoc network and has a hardwired Ethernet to the internet is a
> candidate for this. A phone with a 3G or 4G cellular connection is also such
> a candidate.
>
>
>
> ·         I have Olsrd2 ported to Android and it is running inside an App on
> the Android devices
>
> ·         I am using olsrd2_static as it just makes it simpler (at least at
> this juncture)
>
> ·         I am using fixed IP addresses on the WiFi for now
>
> o   I do really want to have the devices generate their own IP’s as this is
> a cool version 2 enhancement but haven’t gotten that to work yet. Later!
>
>
>
> The problem is best explained using a simple 2 node network example.
>
> 192.168.18.5 is a gateway device. It’s hardwired address on eth0 is
> 192.168.1.115 and its default gateway to the Internet is the router at
> 192.168.1.1
>
> There is 1 other Android node on the test network – 192.168.18.106
>
> The gateway route on both devices looks like the following:
>
>
>
> Ip route on gateway
>
>
>
> default via 192.168.1.1 dev eth0
> 192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.115
> 192.168.18.0/24 dev wlan0  proto kernel  scope link  src 192.168.18.5
>
> 192.168.18.106 via 192.168.18.106 dev wlan0  proto 100 src 192.168.18.5
> metric 2 onlink
>
>
>
> Ip route on Android device 192.168.18.106
>
>
> 192.168.18.0/24 dev wlan0 proto kernel scope link src 192.168.18.106
>
> 192.168.18.5 via 192.168.18.5 dev wlan0  proto 100 src 192.168.18.106 metric
> 2 onlink
>
>
>
> When using HNA on OLSRDv1 with an entry in the conf file like
>
>
>
> Hna4
>
> {
>
> # Internet gateway
>
> 0.0.0.0  0.0.0.0
>
> }
>
>
>
> a default route on the Android device is added automatically
>
>
>
> default via 192.168.18.5 dev wlan0 metric 2 onlink
>
>
>
> It’s complete gateway now (using olsrv1) is
>
>
>
> default via 192.168.18.5 dev wlan0 metric 2 onlink
>
> 192.168.18.0/24 dev wlan0 proto kernel scope link src 192.168.18.106
>
> 192.168.18.5 via 192.168.18.5 dev wlan0  proto 100 src 192.168.18.106 metric
> 2 onlink
>
>
>
> Now the Android device can access the Internet by routing packets through
> the gateway.
>
>
>
> However, I am not able to replicate the same behavior on OLSRDv2. I have
> tried using the lan_import plugin but am a little clueless on how to
> propagate the default gateway in version 2 from the gateway devices to it’s
> edge devices.
>
>
>
> Can someone please help me set up my gateway device properly so the Android
> devices can see the Internet?
>
>
>
> Here is the olsrd2_static –schema output:
>
>
>
> List of section types:
> (use this command with the types as parameter for more information)
>     domain (named, default name)
>     ff_dat_metric (unnamed)
>     global (unnamed)
>     http (unnamed): Settings for the http interface
>     interface (named)
>     lan_import (named)
>     log (unnamed)
>     mesh (unnamed)
>     neighbor_probing (unnamed)
>
>     nhdp (unnamed)
>
>     nl80211_listener (unnamed)
>     olsrv2 (unnamed)
>     telnet (unnamed): Settings for the telnet interface
>
> And olsrd2_static –version output
>
>
>
> OLSRd2 version 0.11.1
> Git commit: v0.11.1-0-g35a1f94
> Visit http://www.olsr.org
> Static plugin: auto_111
>
> Static plugin: cfg_compact
> Static plugin: class
> Static plugin: clock
> Static plugin: duplicate_set
> Static plugin: ff_dat_metric
> Static plugin: http
> Static plugin: lan_import
> Static plugin: layer2
> Static plugin: layer2info
> Static plugin: link_config
> Static plugin: neighbor_probing
> Static plugin: netjsoninfo
> Static plugin: nhdp
> Static plugin: nhdpinfo
>
> Static plugin: nl80211_listener
> Static plugin: olsrv2
> Static plugin: olsrv2info
> Static plugin: os_clock
> Static plugin: os_fd
> Static plugin: os_interface
> Static plugin: os_routing
> Static plugin: os_system
> Static plugin: packet_socket
> Static plugin: rfc5444
> Static plugin: socket
> Static plugin: stream_socket
> Static plugin: systeminfo
> Static plugin: telnet
> Static plugin: timer
> Static plugin: viewer
>
>
>
> Thanks for any help forthcoming.
>
>
>
> Peter Emanuel
>
>
>
>
>
>
> --
> Olsr-dev mailing list
> (spam-protected)
> https://lists.olsr.org/mailman/listinfo/olsr-dev



More information about the Olsr-dev mailing list