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).
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.
-
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.
-
Save the diagram
In the Windows GUI, choose draw.io or Graphviz in Save As, or set it in Options. On the console, add
--topology FILEwith a name ending in.drawio,.dotor.gv. It works the same on Windows and Linux. -
Open and edit it
Open the
.drawiofile in draw.io, move things around, add notes, and export to PNG, SVG, PDF or Visio. Or render the.dotfile with Graphviz.
draw.io or Graphviz
draw.io (diagrams.net)
- A
.drawiofile 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
.dotor.gvtext 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 5.30, released November 15, 2026. Free for everyone.
-
Download for Windows
Windows
The Windows GUI (
smgui.exe) and the command-line program (sm.exe). 8.0 MB zip. -
Download for Linux
Linux
A single portable command-line program (
sm) with nothing to install. Needs x86_64 and glibc 2.28 or newer. 3.8 MB.