[WLANware] HNA4 multiple gateways
Jan Groenewald
jan at aims.ac.za
Tue Feb 19 17:33:33 CET 2008
Hi
On Tue, Feb 19, 2008 at 05:46:16PM +0200, wrote:
> olsrd-mod-dyn-gw might well be the culprit.
B.The dynamic Internet gateway plugin
Nodes in a MANET might dynamically obtain and lose
Internet connectivity through interfaces not participating in
the MANET routing. A typical scenario would be a laptop
that might be connected to the Internet trough an Ethernet
link for a limited time.
A plugin that dynamically updates the HNA information
announced by the local node has been implemented. This
plugin checks if the local node has an Internet-connection
and updates the local HNA set based on this.
OK, so my hna4 is being updated behind my back on old-gw, and this
is the only one where I have to disable it, since all other WANs are
off or have a valid default gw. So it *should* be solved now.
The main object of this plugin is to poll for an Internet
route and add or remove such a route from the local HNA set
if a change is detected. An Internet connection is identified by
a default gateway with a hop count of 0. So a route to
0.0.0.0/0 with metric 0 is considered an Internet route. Since
OLSR uses a hop count/metric bigger than 0 on all routes,
this plugin will not react to Internet gateways added by olsrd.
To poll for route updates a function that searches the kernel
routing table for a default gateway is registered with the olsrd
scheduler to be executed regularly on a given interval. If a
new Internet route with metric 0 is discovered, the plugin will
add this entry to the local HNA set by calling the function:
void add_local_hna4_entry(union olsr_ip_addr *net, union
hna_netmask *mask)
This function has been fetched from olsrd trough the
plugin interface.
Whenever such a registered Internet route is removed from
the kernel routing table the local HNA entry is also removed
using the function:
void remove_local_hna4_entry(union olsr_ip_addr *net,
union hna_netmask *mask)
This enables nodes to act as Internet gateways whenever
they have some Internet connectivity not set up by OLSR
itself.
IPC:
The dynamic Internet gateway plugin also offers IPC to
read output. Just like with the powerstatus plugin all
communication is outbound, but since clients should be able
to connect at any time, the IPC server socket is registered
with the socket parser of olsrd.
The IPC socket listens on TCP port 9999 and only allows
connections from the local host (127.0.0.1).
It seems to be default on freifunk bin images?
regards,
Jan
--
.~.
/V\ Jan Groenewald
/( )\ www.aims.ac.za
^^-^^
More information about the WLANware
mailing list