What is Prescriptive Topology Manager (PTM) & DOT?

W

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.

1 comment

  • Nice summary, thanks.
    CDP support in non-Cisco devices is ‘spotty’ because when it was first released, vendors decided that releasing their own reverse-engineered version would have run a serious risk of a lawsuit. This is obviously true for many of Cisco’s other proprietary protocols, which have either died a protracted death or are in their final death throws. Please can we be rid of PVST* now?

By Ethan Banks

Ethan Banks is a podcaster and writer with a BSCS and 20+ years in enterprise IT. He's operated data centers with a special focus on infrastructure — especially networking. He's been a CNE, MCSE, CEH, CCNA, CCNP, CCSP, and CCIE R&S #20655. He's the co-founder of Packet Pushers Interactive, LLC where he creates content for humans in the hot aisle.

Newsletter