[Interop-dev] NetJSON: clarify what an ID is
Bastian Bittorf
(spam-protected)
Thu Aug 27 11:55:47 CEST 2015
* Nemesis <(spam-protected)> [13.08.2015 15:44]:
> Ok, I'm open for suggestions. I want to find a solution, what about we
> try to describe a NetworkGraph JSON structure as known by a babel node?
>
> I will try to immagine a possible JSON structure, but I'm shooting in
> the dark, so please forgive me if get it wrong, help me getting it right
> by suggesting alternative (plus ignore inline comments because they are
> not valid JSON):
>
> {
> "type": "NetworkGraph",
> "protocol": "babeld",
> "version": "1.6.2",
> "metric": "hop-count",
> "router_id": "12:ab:34:cd:56:ef",
> "nodes": [
> // current node
> { "id": "12:ab:34:cd:56:01", "interface": "wlan0" }, // wlan0
> { "id": "12:ab:34:cd:56:01", "interface": "wlan1" }, // wlan1
> // other linked node
> { "id": "12:ab:34:cd:57:01", "interface": "wlan0" }, // wlan0
> { "id": "12:ab:34:cd:57:01", "interface": "wlan1" } // wlan0
> ],
> "links": [
> {
> "source": "12:ab:34:cd:56:01",
> "source_interface": "wlan0",
> "target": "12:ab:34:cd:56:02",
> "target_interface": "wlan0",
> "cost": 1.000
> },
> {
> "source": "12:ab:34:cd:56:01",
> "source_interface": "wlan1",
> "target": "12:ab:34:cd:56:02",
> "target_interface": "wlan1",
> "cost": 1.000
> }
> ]
> }
>
> I immagine this as a possible NetworkGraph object returned by a Babel node.
> Would that work? Could you propose a better example?
this is possible, but somehow 'awkward' because we have to collect all
the mac-addresses and the 'id' should be an _arbitrary_ string (e.g.
think about anonymity). some years ago ~2004 we had the same discussion
in the freifunk networks and agreed to use the SSH_PUBLIC_KEY_HASH e.g.:
(spam-protected):~ dropbearkey -y -f /etc/dropbear/dropbear_dss_host_key | grep ^'Fingerprint:' | cut -d' ' -f3
49:4a:57:e4:bc:b2:31:1d:30:f6:5f:fd:f0:de:a5:b7
hmmm, we _can_ calculate the mac-addresses
from the IPv6-fe80/linklocal addresses, but...
would'nt it be easier in the distance-vector/babel-case to let each node
just (and very simple) send to a collector only these values.
# node
{
"id": "$SSH_PUB_KEY_HASH"
"local_addresses": [
$all_my_fe80-addresses, e.g.
fe80...xyz...%wlan7
]
}
# links
{
"source_ip": "fe80...",
"target_ip": "fe80...",
"cost": ...
}
on the collector we can have an intermediate step, which just forms a
correct netjson, where we replace 'source/target_ip' with the correct 'id'.
this has the advantage, that we dont need to suck in a lot of special
things into the specification and the client/sender side keep simple.
bye, bastian
More information about the Interop-dev
mailing list