|
| 1 | +# Topolograph |
| 2 | + |
| 3 | +## v2.32 (24.06.2023) |
| 4 | + |
| 5 | +## New features |
| 6 | +* Extreme OSPF support is added |
| 7 | +* Ericsson OSPF support is added |
| 8 | +* Yaml based topology. Network design mode. |
| 9 | + |
| 10 | +# Yaml based topology |
| 11 | +Topolograph visualizes topologies based on OSPF/IS-IS LSDB files, but starting from v2.32 it accepts YAML to build a graph. It can be used for building arbitrary topologies (not exactly IGP domains), but moreover it can keep the topology updated via Rest API. It's the first version of Network Diagram as a Service (NDAS)! |
| 12 | +OSPF/IS-IS LSDB <-> YAML is interchangeable now in both ways, so it allows to make a design of IGP domain from the scratch or based on uploaded a LSDB, add new links/edges between nodes or change igp's cost and then check network reaction based on our changes. |
| 13 | +### Basic YAML based topology. |
| 14 | +Build a graph with defined `nodes` and `edges`. |
| 15 | + |
| 16 | + |
| 17 | +### Node attributes |
| 18 | +* `node's name` is mandatory. Should be in IP-address format. To change it to any other value - use `label` |
| 19 | +* Tags of node are optional. Any key (type string): value (str, int, float, dictionary, list) pairs. |
| 20 | + |
| 21 | +There is a graph with 6 nodes. Select all primary nodes (`ha_role`: `primary`) in the first DC (`dc1`) |
| 22 | +``` |
| 23 | +import requests |
| 24 | +from pprint import pprint as pp |
| 25 | +query_params = {'location': 'dc1', 'ha_role': 'primary'} |
| 26 | +r_get = requests.get(f'http://{TOPOLOGRAPH_HOST}:{TOPOLOGRAPH_PORT}/api/diagram/{graph_time}/nodes', auth=(' ', ' '), params=query_params, timeout=(5, 30)) |
| 27 | +``` |
| 28 | +Reply |
| 29 | +``` |
| 30 | +pp(r_get.json()) |
| 31 | +[{'ha_role': 'primary', |
| 32 | + 'id': 1, |
| 33 | + 'label': '10.10.10.2', |
| 34 | + 'location': 'dc1', |
| 35 | + 'name': '10.10.10.2', |
| 36 | + 'size': 15}] |
| 37 | +``` |
| 38 | +### Edge attributes |
| 39 | +* `src`, `dst` is mandatory. |
| 40 | +* `cost` is optional. Default is 1. Equal to OSPF/IS-IS cost. |
| 41 | +* `directed` is optional. Default is false. |
| 42 | +* Tags of edge are optional. Any key (type string): value (str, int, float, dictionary, list) pairs. |
| 43 | + |
| 44 | +Select all edges over verizon ISP between `10.10.10.2` and `10.10.10.4` |
| 45 | +``` |
| 46 | +query_params = {'src_node': '10.10.10.2', 'dst_node': '10.10.10.4', 'isp': 'verizon'} |
| 47 | +r_get = requests.get(f'http://{TOPOLOGRAPH_HOST}:{TOPOLOGRAPH_PORT}/api/diagram/{graph_time}/edges', auth=(' ', ' '), params=query_params, timeout=(5, 30)) |
| 48 | +``` |
| 49 | +Reply |
| 50 | +``` |
| 51 | +pp(r_get.json()) |
| 52 | +[{'bw': 1000, |
| 53 | + 'cost': 1, |
| 54 | + 'dst': '10.10.10.4', |
| 55 | + 'id': 3, |
| 56 | + 'isp': 'verizon', |
| 57 | + 'media': 'fiber', |
| 58 | +``` |
| 59 | +### Network reaction on adding new link between devices. |
| 60 | +Let's add a new link with `cost` 1 between R3 (10.10.10.3) and R4 (10.10.10.4) device and see how network will react on it. |
| 61 | + |
| 62 | +Obviously, we see traffic increase on direct link R3<->R4 and traffic decrease to R2 (10.10.10.2) and R5 (10.10.10.5). |
0 commit comments