Building network automation solutions

9 module online course

Start now!

Automation Solution: Create Network Diagram from BGP Data in Nornir

Chris Crook decided to work on a pretty typical problem for his second hands-on assignment in the Building Network Automation Solutions online course: create a network diagram from adjacency data.

He decided to rely on BGP adjacencies (I would usually use LLDP) and added an interesting twist: instead of Ansible he used Nornir with NAPALM.

We would usually generate network diagrams with Graphviz, but Chris found a JavaScript library that takes graph description in DOT format and displays it dynamically in a web page. Pure awesomeness ;)

You can view his solution on GitHub (I like how clean his Python code looks) and learn more about Nornir straight from its author: David Barroso did a deep dive into Nornir during the Autumn 2018 automation course (content accessible to course attendees and users with Expert Subscription).

We migrated our blog a few days ago, and the commenting functionality is not there yet. In the meantime enjoy the older comments, or find our content on LinkedIn and comment there.


  1. Nice work Chris!