gitwtfhub

wtf is igp-graph?

packetsource/igp-graph — explained in plain English

Analysis updated 2026-05-18

0PythonAudience · ops devopsComplexity · 2/5Setup · moderate

TL;DR

A command line tool that connects to a Juniper router over SSH and turns its OSPF or IS-IS routing data into a Graphviz diagram.

Mindmap

mindmap
  root((igp-graph))
    What it does
      SSH to router
      Extract OSPF or ISIS
      Render Graphviz diagram
    Tech stack
      Python
      Graphviz
      pipx
    Use cases
      Topology visualization
      Network diagnostics
      Filtered graphs
    Audience
      Network engineers
      Ops teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Visualize a network's OSPF or IS-IS topology as a graph diagram

REASON 2

Pull live routing data from a Juniper router over SSH for analysis

REASON 3

Filter a network graph down to specific nodes using a regex pattern

REASON 4

Generate a .dot file for further processing without rendering a PNG

What's in the stack?

PythonGraphvizSSHpipx

How it stacks up

packetsource/igp-graph0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultymoderatemoderatemoderate
Complexity2/52/54/5
Audienceops devopsgeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires SSH access to a Juniper router and Graphviz installed to render PNG output.

Wtf does this do

igp-graph is a command line tool for network engineers who manage Juniper routers. It connects over SSH to a Juniper router, pulls out the router's internal routing database, either OSPF or IS-IS depending on which protocol you tell it to inspect, and feeds that data into Graphviz to produce a visual diagram of the network topology. The README is short and focused on installation and usage rather than explaining the internals, so this description stays close to what it states directly. You build the tool as a standalone package using Python's setuptools build tool, running pip install build followed by python3 -m build. Once built, you install the resulting package with pipx, which is a common way to install Python command line tools in an isolated environment. To run it, you give the tool a target, which can either be a local XML file you already have or the address of a router to query live over SSH. Command line options let you choose between OSPF and IS-IS as the protocol to inspect, prompt for an SSH password instead of typing it inline, supply an SSH username, turn on verbose output, and filter the resulting graph down to nodes matching a regular expression pattern. There is also a strict mode for that filter, which requires every node shown in the graph to match the pattern rather than just some of them, and an option to stop after generating the intermediate .dot file instead of rendering it all the way to a PNG image. The README does not describe the internal architecture, dependencies beyond Graphviz and pipx, or a license, so those details are not covered here. It credits a Gavin James edition in the tool's own help text.

Yoink these prompts

Prompt 1
Walk me through building and installing igp-graph with pip and pipx
Prompt 2
Show me the command to query a Juniper router's OSPF database over SSH with igp-graph
Prompt 3
Explain how the --grep and --strict flags filter the generated graph
Prompt 4
How do I generate just the .dot file without a PNG using igp-graph

Frequently asked questions

wtf is igp-graph?

A command line tool that connects to a Juniper router over SSH and turns its OSPF or IS-IS routing data into a Graphviz diagram.

What language is igp-graph written in?

Mainly Python. The stack also includes Python, Graphviz, SSH.

How hard is igp-graph to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is igp-graph for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.