Auto Network Diagram with Graphviz
One of the most useful and least updated pieces of network documentation is the network diagram. We all know this, and yet we still don’t have/make time to update this until something catastrophic happens and then we says to ourselves
Wow. I wish I had updated this sooner…
Graphviz
According to the website
Graphviz is open source graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. It has important applications in networking, bioinformatics, software engineering, database and web design, machine learning, and in visual interfaces for other technical domains.
note: Lots of great examples and docs there BTW. Definitely check it out.
Getting started
So you’re going to have to first install graphviz from their website. Go ahead… I’l wait here.
Install the graphviz python binding
This should be easy assuming you’ve already got python and pip installed. I’m assuming that you do.
>>> pip install graphviz
Getting LLDP Neighbors from Arista Devices
You can use the Arista pyeapi library, also installable through pip as well. There’s a blog which introduces you to the basics here which you can check out. Essentially I followed that blog and then substituted the Continue reading