Visualizing Neutron Networking with GraphViz

Mon 23 December 2013 by Lars Kellogg-Stedman Tags openstack neutron networking

I've put together a few tools to help gather information about your Neutron and network configuration and visualize it in different ways. All of these tools are available as part of my neutron-diag repository on GitHub.

In this post I'm going to look at a tool that will help you visualize the connectivity of network devices on your system.


There are a lot of devices involved in your Neutron network configuration. Information originating in one of your instances has two traverse at least seven network devices before seeing the light of day. Understanding how everything connects is critical if you're trying to debug problems in your envionment.

The mk-network-dot tool interrogates your system for information about network devices and generates dot format output showing how everything connects. You can use GraphViz to render this into a variety of output formats. The script must be run as root, so I usually do something like this:

sudo sh mk-network-dot | dot -Tsvg -o network.svg

The dot language is a language designed for describing graphs, and the syntax looks something like this:

digraph example {
  A -> B
  A -> C
  C -> D
  B -> D

Which would produce output like this:

Dot output example

When run on my laptop, with a simple all-in-one configuration and five instances across two networks, the result of running mk-network-dot looks like this:

There are a few caveats with this tool:

  • As of this writing, it doesn't know about either bond interfaces or VLAN interfaces.
  • It's had only limited testing.

If you try this out and something doesn't work as you expect, please open a new issues on the GitHub issues page.