FREE TOOL

Network diagram generator

Paste show lldp neighbors or show cdp neighbors output, the brief table or the detail form, and get a Mermaid topology diagram. It runs in your browser, so nothing you paste leaves this page, and it needs no account or sign-in.

Neighbor output

How it works

The tool reads three things out of each row: the neighbor device, the local interface, and the remote port. Everything else in the output, the hold time, the capability codes, the platform string, gets thrown away. What is left is a list of links. The generator loops over that list once to build the diagram.

Paste output from several devices in one go. Include the prompt line, likeacc-sw01#show lldp neighbors, and each block gets attributed to the right device. The same link reported from both ends is merged, so you can dump your whole campus in and get one diagram instead of a pile of duplicates.

The detail forms work too, and you can mix them with the brief tables in one paste. Detail output reports full domain names (core-sw01.corp.example.com) and NX-OS appends the serial number to the system name; both get stripped so the same device merges into one node no matter which format reported it. A wireless controller or AP that reports its MAC address as the LLDP Port id gets its interface name from the Port Description line instead.

What it does not do

The generator draws only what the neighbor tables report: one node per device, one edge per link. It cannot place your racks, mark which device is the core, or add a link that neighbor discovery did not see. If LLDP is off on a link, that link is missing from the output, so it is missing from the diagram too. Check the table above against your own network before you publish the picture.

Doing this yourself, in code

Pasting into a web page is the demo. A script that runs against your own devices regenerates the diagram every time you collect neighbor data, so it does not go stale. That script is about twenty lines of Python, andthe full walkthrough covers the flowchart grammar, the campus patterns, the sequence and state diagrams, and the generator with its real output.

The lesson version is free on RouteSwitchU. It adds a terminal recording of a topology drawing itself, a Python box you can run in the browser, and a graded lab that checks the four generator functions against a test suite. It asks for a free account and nothing else.

Read the referenceOpen the lesson, free with an account