SSH to a Juniper router, extract the OSPF database, and pump it into Graphviz to produce a visualisation
Build a standalone .tar.gz package using the python setuptools build tool
pip install build
python3 -m build
Install the package using pipx
pipx install igp_graph.tar.gz
usage: igp-graph [-h] [--protocol {ospf,isis}] [-p] [-u username] [-v] [--grep pattern] [-n] [--strict] target
Python Juniper OSPF Database to Graphviz Tool (Gavin James edition)
positional arguments:
target Local XML filename, or target router to query via SSH
options:
-h, --help show this help message and exit
--protocol {ospf,isis}
IGP type to inspect
-p Prompt for a password (for SSH)
-u username SSH username
-v Verbose output
--grep pattern Filter the graph for regex
-n Just produce the .dot file only, don't generate PNG
--strict Strict grep (all rendered nodes must match)```