Graphviz examples

Like most popular open source projects, the documentation of Graphviz (http://www.graphviz.org/Documentation.php) is extensive. The challenge for someone new to the software is often where to start. For our purpose, we will focus on the dot graph, which draws directed graphs as hierarchies (not to be confused with the DOT language, which is a graph description language).

Let's start with some of the basic concepts:

  • Nodes represent our network entities, such as routers, switches, and servers
  • The edge represents the link between the network entities
  • The graph, nodes, and edges each have attributes (https://www.graphviz.org/doc/info/attrs.html) that can be tweaked
  • After describing the network, we can output the network graph ...

Get Mastering Python Networking - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.