Topology Graph Output Module

graph output module create a description of network topology in graphviz DOT format. You can use that description with graphviz commands to create topology diagrams in numerous output formats.

Note: The network topology graph description contains nodes and links but no placement information. graphviz is pretty good at figuring out how to draw the required graph, but it pays out to test out various layout engines (hint: use the name of the layout engine as the CLI command).

The graph output module is invoked by specifying -o graph parameter in netlab create command. It takes an optional destination file name (default:

A single formatting modifier can be used to specify the graph type:

  • topology (default) – Include, physical links, and multi-access- and stub subnets. When the network topology contains BGP information, the graph groups nodes into autonomous systems.

  • bgp – Include autonomous systems, nodes, and BGP sessions.

Modifying Graph Attributes

Graphing routines use default topology settings to modify the node- or link parameters of the generated DOT file:

  • outputs.graph.interface_labels – Add IP addresses to links in topology graph. Results in a cluttered image (but feel free to fix that and submit a pull request).

  • outputs.graph.colors.object – Specify background color for as, node, stub subnet, ibgp or ebgp session.

  • – Inner margin for autonomous system boxes.

You could specify these attributes in your topology file, in per-user topology defaults, or in system defaults (more details). You could also specify them with -s parameter of netlab create command (more details). The system defaults in netsim-tools release 0.9 are included below:

    interface_labels: False
    as_clusters: True
      as: "#e8e8e8"
      node: "#ff9f01"
      stub: "#d1bfab"
      ibgp: "#613913"
      ebgp: "#b21a1a"
      as: 16