[Interop-dev] Network Topology JSON [was: OLSRd2 JSON APIs]

Henning Rogge (spam-protected)
Wed Nov 19 12:24:36 CET 2014


On Wed, Nov 19, 2014 at 11:38 AM, Nemesis <(spam-protected)> wrote:
> Hey Henning,
>
> On 11/16/2014 01:38 PM, Henning Rogge wrote:
>> {
>>     "type": "OLSR1",
>>     "route" : [
>>         {
>>             "destination": "<ip/prefix>",
>>             "source": "<ip/prefix>",
>>             "next" : "<ip>",
>>             "device": "<dev>",
>>             "cost": "<value>",
>>         }
>>     ]
>> }
>>
>> destination is the IP or prefix that will be matched to the IP
>> destination of the traffic, source is the same (optional) for the IP
>> source (necessary for source-specific routing). next is the IP of the
>> next hop, device is the interface the traffic will be going to and
>> cost an integer number greater or equal zero.
>
> thank you very much.
>
> I guess in place of ip/prefx there could be also mac addresses for
> layer2 routing protocols like batman-adv?

Yes, this could also be a layer-2 address.

> One question: I heard different metrics can be used simultaneously on a
> network in certain routing protocols. Is that true? If yes should we
> also add a "metric" attribute that tells if the metric is something as
> ETX or ETT? Or this is not important and can be omitted?

If you run different metrics, you create multiple routes. Maybe we
need to add the routing table to the tuple.

the "cost" value should contain the metric as a dimensionless value,
so external code can judge if one route is better than another one
without knowing the metric type. But we could add a "cost_type" as a
free-text field that describes the content of the cost field.

{
    "route" : [
        {
            "destination": "<ip/prefix>",
            "source": "<ip/prefix>",
            "next" : "<ip>",
            "device": "<dev>",
            "table": <routing-table>
            "cost": "<value>",
            "cost_type": "<name of cost algorithm>"
        }
    ]
}

"cost_type" value could be things like ETX, ETT or "BATMAN metric xyz"
or whatever.

> I'd like to take this example and add it to the repo (yeah, we'll change
> the name to the repo too).

Sure :)

Henning




More information about the Interop-dev mailing list