[Interop-dev] Device Config: should we have a "routes" section too for static routes?

Henning Rogge (spam-protected)
Sun Nov 30 10:19:41 CET 2014


On Sun, Nov 30, 2014 at 10:10 AM, Nemesis <(spam-protected)> wrote:
> Hi people,
>
> here it comes the next question:
> https://github.com/interop-dev/json-for-networks/issues/4
>
> Should we model the static routes of a device (what's in ip route or route
> -n)?
>
> Ubus does this but inserts the routes in each interface (same for
> dns-servers and dns-search).
>
> Since we have one dns_servers block and one dns_search block, it would make
> sense to make a single routes section for consistency, unless we think it's
> more practical to have this information stored at interface level like ubus
> does.
>
> Since Henning Rogge (core OLSR developer) confirmed that we can reuse the
> structure in
> https://github.com/interop-dev/json-for-networks/blob/master/examples/network-routes.json
> also for static routes
> (https://lists.funkfeuer.at///pipermail/interop-dev/2014-November/000308.html)
> we could add something like this to DeviceConfiguration:
>
> "routes": [
>         {
>             "destination": "ID",
>             "source": "ID",
>             "next" : "ID",
>             "device": "DEVICE",
>             "cost": 1
>         }
> ]

Just define a routing-protocol with the well-known name "static". This
makes it very easy to parse the routes of multiple protocols including
static routes. No special case for static routes required. The "cost"
of the static routes is the only thing that could be a bit tricky.

Henning




More information about the Interop-dev mailing list