jch at pps.univ-paris-diderot.fr
Fri Jul 3 16:19:11 EDT 2015
> Sometimes it's necessary to re-configure an OpenWRT system based on the
> fact wether Internet connectivity is available on a certain interface.
> One example where this is useful is: When Internet is available, we
> configure BATMAN to act as a gateway 'server', if not as a gateway
I think that a solution that relies on distribution scripts is inherently
brittle. The routing daemon should be able to detect the current
configuration, in a distribution-independent manner, and automatically
adapt to the current situation. This is what happens with babeld -- it is
able to automatically redistribute a kernel route (typically the default
route, but not necessarily) into the routing protocol.
I know of three ways of automatically obtaining a default route, in
descending order of preference:
- if the other end of the Internet connection speaks RIP, RIPng or OSPF,
we run Quagga on the gateway and redistribute into Babel;
- if DHCPv4 is reliable (it usually is), then we simply redistribute the
DHCP-provided route into the routing protocol;
- if DHCPv4 is unreliable, we use the "babel-pinger" utility which
pings a remote host and installs a route depending on its availability.
Additionally, there is some very promising but still experimental work to
provide a fully general and highly integrated solution in the "hnetd-full"
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel