Chris Friesen writes:
> The box(es) which inspired this sit on a private network, and once they are
> brought into service, the routes never change. However, there is a command
> from
> our gui to manually drop and raise the ethernet link (just in case something
> goes wrong and can't be handled automatically) and it would simplify our code
> greatly if the routes that are automatically deleted would be automatically
> put
> back.
If we limit us to "static routes" for the other routes we must definitely
leave to
some with routing/topologi knowledge and we must not break systems with
"routing
daemons".
If we look into the routing world a "route" can come from different
origins/routing
protocols static/ospf/rip/bgp and there is preferences to decide which one to
install.
So
ip route add x y proto static
Is registered by routing daemon and installed if it has the best pref. and the
route is hidden otherwise to be restored when appropriate. And the route is
invalid
but kept by the daemon over "link downs"
And I think
ip route rep x y proto static
or something similar at link up for restoring "static" routes would not break
for the daemons either. But I got a feeling it can hurt more than it helps.
> In this case, my software *is* essentially the routing daemon, and I want it
> to
> be simpler to maintain.
Well router daemons belongs to "user space" and via netlink you should be able
to
do most of what you want.
Cheers.
--ro
|