ieee1905 stack provides methods which can be used by an application to build network topology with respect to a node in the network.
This package provides the **topologyd** daemon.
## Overview
## Overview
map-topology daemon (topo1905d), as we speak, provides two ubus methods as mentioned in the UBUS API section below to build and dump network topology map of the node under test.
The **topologyd** daemon constructs full topology of a IEEE1905 enabled Multi-AP network.
It provides the `topology` UBUS object and methods ( *see UBUS API section below* ) for building and showing the full topology of a network.
The daemon uses 1905 al-mac of the node as a starting point to find its immediate as well as far-1905 and non-1905 neighbors to build a complete topology map around the node.
**topologyd** uses IEEE1905 AL macaddress of a node, where it is running, as the starting (or Root) node. It then discovers it's immediate neighbors, the next-hop neighbors, the next to next-hop neighbors, and so on... until there are no more neighbor nodes in the network, to build the full topology around the starting node.
Topology is built every 60 seconds and the "dump_tree" ubus method displays the results of the last built topology within the 60 second period.
>By default, **topologyd** rebuilds the topology every 60 seconds.
To build a fresh topology, ubus method "build_tree" should be used. See Usage below
To (re)build topology, the UBUS method "*refresh*" can be used. See Usage below -
map-topology uses following algorithm to build network topology using the ieee1905 stack with an assumption that the information provided by the underlying ieee1905 stack is up-to-date.
Following algorithm is used to build the full topology -
At any node 'P' in the network -
````
At any node 'P' in the network:
Intial state:
Intial state:
Nbr(P) = {N0,..Nn} <== immediate neighbors of P.
Nbr(P) = {N0,..Nn} <== immediate neighbors of P.
G{P, N0,..Nn} <== graph of all known nodes at P.
G{P, N0,..Nn} <== graph of all known nodes at P.
<u>Step 1</u>:
for all Ni in G:
Send Topology Request to Ni.
<u>Step 2:</u>
Read Topology Response from Ni.
Step 1 :
for all Ni in G :
Send Topology Request to Ni.
if Nbr(Ni) is not in G:
Step 2 :
Read Topology Response from Ni.
Insert Nbr(Ni) in G
if Nbr(Ni) is not in G :
Insert Nbr(Ni) in G
<u>Step 3:</u>
Step 3 :
Repeat Step 1-2 until no new Nbr(Ni) can be inserted in 'G'.
Repeat Step 1-2 until no new Nbr(Ni) can be inserted in G.
````
### Ubus API
### UBUS API
This is a verbose print of all the methods provided by map-topology over ubus :
map-topology provides the `topology` UBUS object with following methods :
````bash
````bash
'topo1905' @fc2af0e9
'topology' @fc2af0e9
"build_tree":{}
"refresh":{}
"dump_tree":{}
"status":{}
"refresh":{}
"changelog":{}
````
````
### Usage
### Usage
On successful registration, map-plugin broadcast an ubus event on arrival of
multiAP specific CMDUs in below format.
````bash
````bash
root@iopsys:~# ubus call topo1905 build_tree
#To (re)build topology -
root@iopsys:~$ ubus call topology refresh
#To get status (can be "incomplete" or "available") -