• Skip to primary navigation
  • Skip to main content
Ethan Banks

Ethan Banks

@ecbanks

  • Blog
  • Book
  • Podcasts
  • RSS
  • Show Search
Hide Search

What is Prescriptive Topology Manager (PTM) & DOT?

Ethan Banks · 3 minutes to read
Published August 27, 2014 · Updated August 27, 2014

While browsing through the blog post about the Cumulus Linux 2.2 release as well as the release notes, I noticed several references to Prescriptive Topology Manager (PTM). Having not heard of this feature before, I dug in to discover what PTM is all about.

First of all, here’s a PTM summarizing quote from the release notes page.

PTM simplifies operations workflow and reduces risk by prescribing how a network is supposed to operate.

Another quote from Cumulus Linux 2.1.1 documentation states…

In data center topologies, right cabling is a time-consuming endeavor and is error prone. PTM is a dynamic cabling verification tool to help detect and eliminate such errors. It takes a graphviz-DOT specified network cabling plan (something many operators already generate), stored in a topology.dot file, and couples it with runtime information derived from LLDP to verify that the cabling matches the specification. The check is performed on every link transition on each node in the network. It also detects forwarding path failures using Bidirectional Forwarding Detection (BFD).

Put another way, PTM makes sure that the actual, physical cabling done on a network matches a predefined plan. To detect what ports are plugged into what ports, it uses Link Layer Discovery Protocol (LLDP), reading and interpreting LLDP advertisements, parsing out the switch and interface information, and matching it to the DOT-described cabling plan. Depending on whether the topology passes or fails inspection, some action is taken. Where does PTM run? In this setting, as a daemon on a switch running Cumulus Linux.

For those unfamiliar with LLDP, it’s similar to Cisco Discovery Protocol, but while CDP is Cisco-proprietary, LLDP is industry-standard. Many modern Cisco devices and operating systems support LLDP as well as CDP. As an aside, I’ve been moving away from CDP, and using LLDP wherever possible. LLDP is well supported on non-Cisco devices, while CDP support on non-Cisco devices is spotty. CDP is not supported by PTM from what I can tell.

Another question then is, “What is DOT?” I personally have not worked with DOT before, so I had to do a little digging. Wikipedia suggests that…

DOT is a plain text graph description language. It is a simple way of describing graphs that both humans and computer programs can use. DOT graphs are typically files that end with the .gv (or .dot) extension.

Okay, fair enough. So what does a DOT file look like? I examined the Wikipedia examples, and discovered GraphViz, a free tool that renders DOT files. After perhaps 45 minutes of playing around with DOT syntax in a plaintext editor and feeding it to GraphViz, I generated a graph that looks like this.

graphviz-leaf-spine-dot
Click to BIGGIFY.

The DOT file I wrote to create that diagram is as follows.

digraph g {
    graph [nodesep="1.5" ranksep="1"];
    node [shape="box"];
    edge [splines="line"];

    SPINE01 -> LEAF01 [color="red"];
    SPINE01 -> LEAF02 [color="red"];
    SPINE01 -> LEAF03 [color="red"];
    SPINE01 -> LEAF04 [color="red"];
    SPINE01 -> LEAF05 [color="red"];
    SPINE01 -> LEAF06 [color="red"];
    SPINE01 -> LEAF07 [color="red"];
    SPINE01 -> LEAF08 [color="red"];

    SPINE02 -> LEAF01 [color="blue"];
    SPINE02 -> LEAF02 [color="blue"];
    SPINE02 -> LEAF03 [color="blue"];
    SPINE02 -> LEAF04 [color="blue"];
    SPINE02 -> LEAF05 [color="blue"];
    SPINE02 -> LEAF06 [color="blue"];
    SPINE02 -> LEAF07 [color="blue"];
    SPINE02 -> LEAF08 [color="blue"];

    SPINE03 -> LEAF01 [color="green"];
    SPINE03 -> LEAF02 [color="green"];
    SPINE03 -> LEAF03 [color="green"];
    SPINE03 -> LEAF04 [color="green"];
    SPINE03 -> LEAF05 [color="green"];
    SPINE03 -> LEAF06 [color="green"];
    SPINE03 -> LEAF07 [color="green"];
    SPINE03 -> LEAF08 [color="green"];

    SPINE04 -> LEAF01 [color="purple"];
    SPINE04 -> LEAF02 [color="purple"];
    SPINE04 -> LEAF03 [color="purple"];
    SPINE04 -> LEAF04 [color="purple"];
    SPINE04 -> LEAF05 [color="purple"];
    SPINE04 -> LEAF06 [color="purple"];
    SPINE04 -> LEAF07 [color="purple"];
    SPINE04 -> LEAF08 [color="purple"];
 
}

Now, this isn’t the specific DOT syntax required by PTM. If you think about it, there’s not enough information. To be able to cross reference LLDP data with the DOT, the DOT would have to include the switchport to switchport mappings, which my DOT does not. I’m merely illustrating how simple it is to build a DOT file in general. As a side note, I think I need to play with GraphViz a little more and the DOT language a little more. I can think of some complex but repetitive diagrams that could be created even faster than my current favorite diagramming tool, Scapple.

I might explore PTM further in a future post. In the meantime, you can Google this for more information & detail. There’s also a helpful YouTube video below.

Filed Under: SDN & Open NetworkingPublished on ethancbanks.com.

Have You Read…?

  1. What Does An ‘R’ Before A String Mean In Python?
  2. How To Pass API Query Parameters In A Curl Request
  3. Synology Running Out Of Space? Empty The Recycle Bin.
  4. Free Networking Lab Images From Arista, Cisco, nVidia (Cumulus)
  5. How To Create A Python Function You Can Call From Other Scripts
  6. How To Use Grep + Regex To Match Non-200 HTTP Status Codes In Apache Server Logs
  7. When Stretching Layer Two, Separate Your Fate
  8. How To: Simple Juniper SRX Rate-Limiting via Policer
  9. Using AppleScript To Size A Window To 16×9 On MacOS
  10. Auto-Adding Routes When Mac PPTP Connection Comes Up

MORE FREE STUFF!

Check out my IT Education Twitter Collection.
Curated tweets for IT professionals trying to up their game.

twitter mastodon linkedin instagram linkedin

Have a great day. You're doing an outstanding job. 👍

About · Privacy

Copyright © 2007–2023 Ethan Banks