A network diagram, drawn from your switches.

SwitchMiner reads the CDP and LLDP neighbors of your Cisco and Arista switches over SNMP and draws the links between them as a network topology diagram. Open it in draw.io (diagrams.net) or render it with Graphviz. You do not draw anything by hand, and you can make a fresh diagram whenever the network changes.

Free and open source (GPLv3).

A network topology diagram made by SwitchMiner: a core switch linked to two distribution switches and two routers, access points in a ring around each distribution switch, and every link labeled with the ports and speed. Two links are red to show a mismatch between their ends
Part of a SwitchMiner diagram, opened in draw.io. Access points sit in a ring around their switch, every link is labeled with its ports and speed, and the two red links are ones where the two ends do not match. All names are sample data.

How to make a network diagram from your switches

The diagram comes from a normal scan. There is nothing extra to collect, and no agent to install on your switches.

  1. Scan with discovery on

    Enter one switch and your SNMP credentials, turn on Discovery, and scan. SwitchMiner follows the CDP and LLDP neighbors from that switch to the others, so one starting point can map a whole closet or floor.

  2. Save the diagram

    In the GUI, choose draw.io or Graphviz in Save As, or set it in Options. On the console, add --topology FILE with a name ending in .drawio, .dot or .gv. It works the same on Windows, Linux and macOS.

  3. Open and edit it

    Open the .drawio file in draw.io, move things around, add notes, and export to PNG, SVG, PDF or Visio. Or render the .dot file with Graphviz.

draw.io or Graphviz

draw.io (diagrams.net)

  • A .drawio file that opens in draw.io on the web or the desktop
  • Cisco-style icons for switches, routers and other devices
  • Access points placed in a ring around the switch they connect to
  • Every link is a line you can move, relabel or restyle
  • Export to PNG, SVG, PDF or Visio

Graphviz

  • A .dot or .gv text file
  • Render it into an image with Graphviz, or use it in your own scripts and documentation
  • Keep it in version control and see how the topology changes over time

What the diagram shows

  • Each scanned switch, with its name and address
  • Every link between switches, labeled with the ports and speed
  • Links in red where the two ends disagree, such as a different speed or duplex
  • Bundled links grouped and counted, such as 2 links
  • Neighbors that were not scanned, drawn dashed
  • Hide access points, phones or other devices to keep a large diagram readable

From the console

The console programs for Windows and Linux can draw the diagram on a schedule, so the documentation of your network stays current.

Scan and draw a draw.io diagram

sm -v 2 -c COMMUNITY -s 10.0.0.1 -d --topology network.drawio

Make a Graphviz diagram without access points and phones

sm -v 2 -c COMMUNITY -s 10.0.0.1 -d --topology network.dot --topology-hide ap,phones

Turn it into an image

dot -Tsvg network.dot -o network.svg

Then compare with an earlier scan

Scans can also be compared to show new, missing and moved devices. See compare scans.

Common questions

About network diagrams made with SwitchMiner. More answers are on the main page.

How do I draw a network diagram automatically?

Scan your switches with SwitchMiner and save the result as a draw.io or Graphviz file. The links come from the CDP and LLDP neighbor tables the switches already keep, so the diagram matches what is really connected.

Does it work with Cisco and Arista?

Yes. Cisco switches report neighbors over CDP and LLDP, and Arista switches over LLDP. Other vendors that follow the standard SNMP bridge MIBs also work, with fewer details.

Why is a device missing from the diagram?

A device only appears if a scanned switch reports it as a neighbor. Devices that do not send CDP or LLDP will not show up. Neighbors that SwitchMiner saw but did not scan are drawn dashed, so you can scan them next.

Is it free?

Yes. SwitchMiner is open source under the GNU General Public License version 3.

Get SwitchMiner

Version 6.00, released December 1, 2026. Free for everyone.

  • Windows

    The GUI (smgui.exe) and the command-line program (sm.exe). 64-bit, for Windows 10 and 11. 52.8 MB zip. On older versions of Windows, use version 5.40, a 32-bit program.

    Download for Windows
  • Linux, with the GUI

    The GUI (smgui) and the console program (sm), with the Qt libraries included. Needs x86_64 and glibc 2.35 or newer: Ubuntu 22.04+, Debian 12+, Fedora, and RHEL, Rocky and Alma 9+. 54.0 MB.

    Download for Linux
  • Linux, console only

    A single portable command-line program (sm) with nothing to install. Needs x86_64 and glibc 2.28 or newer, which covers RHEL, Rocky and Alma 8+, Ubuntu 20.04+, Debian 10+, Fedora and openSUSE. 3.9 MB.

    Download console for Linux
  • macOS

    The GUI (Switch Miner.app) and the console program (sm) on a disk image. For Macs with Apple silicon (M1 or later) and macOS 14.4 or newer; there is no Intel version. The app is not signed with an Apple Developer ID, so macOS asks you to approve it the first time you open it, and the readme explains how. 48.1 MB.

    Download for macOS

Back to the SwitchMiner home page