Vadims06 / topolograph

Topolograph.com is an online project which can visualize OSPF/ISIS topology based on LSDB output from a single network device. Then you can not only see (and check) the shortest path from source to destination, but also see the outcome from link or node failure along the path to the destination.
https://topolograph.com
MIT License
177 stars 23 forks source link

how to analyze separate databases from separate IGP instances, at once? #39

Closed laimaretto closed 1 year ago

laimaretto commented 1 year ago

Hello!

Some times one ABR has different IGP instances, meaning separate processes, which boils down in the end, to separate databases. A common scenario is seamless MPLS, where an ABR, or RouteReflector-in--line (RR-in-line) has an IGP instance to the core (if OSPF, area 0 will face the core) and separate instances facing the access (but since the processes are different, a design could use area-0 to the core, and also area-0 to the access, since the databases are independent).

So, a RR-in-line will have a separate DB with backbone information and a another DB with access information.

Which would be a good way of analyzing this scenario? Could I concatenate the DB files into one? Will topolograph handle that? Is there a good way of having such information in the same plot?

thanks!

Vadims06 commented 1 year ago

Hi @laimaretto , Sure, you can put LSDBs from different OSPF's processes into one single file and upload it. It worked for me at least ;) Please keep me posted how it works for you.

Vadims06 commented 1 year ago

whoops, I tested on two ABRs with (Area 0, Area 1) and (Area 0, Area 2) outputs and found that Area 0 links are duplicated. Working on fixing it.

Vadims06 commented 1 year ago

Hi @laimaretto , I've just released v2.34 version with multi LSDB support. Please check. Appreciate for your feedback.

Release notes:
If a network has multiple areas, it is needed to get LSDB output from multiple devices and save it into separate files. Example below uses two LSDB outputs saved in the lsdb_samples folder.

lsdbs_attr_ll = [] lsdb_dir = os.path.join(os.getcwd(), 'lsdb_samples') for vendor_name, protocol_name in [('Cisco', 'ospf'), ('Juniper', 'ospf')]: f_name = os.path.join(lsdb_dir, f"{vendorname}{protocol_name}.txt") with open(f_name) as f: lsdbs_attr_ll.append({'lsdb_output': f.read(), 'vendor_device': vendor_name, 'igp_protocol': protocol_name}) r_post = requests.post(f'http://{TOPOLOGRAPH_HOST}:{TOPOLOGRAPH_PORT}/api/graphs', auth=(TOPOLOGRAPH_WEB_API_USERNAME_EMAIL, TOPOLOGRAPH_WEB_API_PASSWORD), json=lsdbs_attr_ll, timeout=(5, 30)) pp(r_post.json())

Vadims06 commented 1 year ago

Implemented in v2.34