Know what’s plugged into every port.
SwitchMiner scans your Cisco and Arista switches over SNMP and lists every device on every port: MAC address, IP address, computer name and VLAN. It draws a network topology diagram from the links it finds, shows what changed since your last scan, and exports to Excel or CSV. Free and open source, with a Windows GUI and console programs for Windows and Linux.
Free and open source (GPLv3). Rated 4.8 out of 5 from 5 reviews on SourceForge.
From one switch address to a full port map
Give SwitchMiner a switch and it does the walking. It follows CDP to neighboring switches, so a whole closet or floor can be mapped from a single starting point.
-
Point it at your switches
Scan one switch, or load a text file with a batch of them. Several switches are scanned at the same time, and you choose how many threads to use. If you have routers, SwitchMiner can also fill in IP addresses and computer names, and a ping sweep of the router’s subnets or of ranges you choose finds more of the devices.
-
It reads them over SNMP
SNMP v1, v2c and v3 are supported, including MD5, SHA and SHA-2 (SHA-224 to SHA-512) authentication and DES and AES (128, 192 and 256-bit) privacy. SwitchMiner pulls port status, VLANs, trunks and the MAC addresses on each port, then looks up IP addresses and computer names. Arista switches are supported, and the vendor is detected automatically.
-
It follows CDP and LLDP neighbors
Neighboring switches are discovered through CDP and LLDP and scanned too, with no need to list them by hand. Exclude patterns keep it from wandering into devices you don’t want scanned.
-
You get a spreadsheet and a diagram
Results are saved as an Excel workbook with one sheet per switch and an Inventory sheet, or as a .csv file. The header row is frozen, filters are on, and problem ports are highlighted. The links between the switches can be saved as a network diagram for draw.io or Graphviz.
Scan many switches, then export
Each switch gets its own tab, and the scan runs on all of them at once. With Discovery turned on, SwitchMiner also finds neighboring switches through CDP and scans them too. When it finishes, save the results to Excel or CSV.
Prefer the command line?
The Linux and Windows console versions look identical. Both run in a terminal and report each switch as it is scanned, along with every neighbor they find through CDP. The Linux version is a single portable program with nothing to install.
A network topology diagram, drawn from your switches
SwitchMiner turns the CDP and LLDP neighbors it finds into a network diagram, so you do not have to draw your switch topology by hand or keep it up to date. Scan, save, and open the diagram in the tool you already use. See an example and how it works.
draw.io (diagrams.net) network diagram
Save as a .drawio file. The switches, routers and other devices use Cisco-style icons, access points are placed in a ring around the switch they connect to, and every link is a line you can move or relabel. From draw.io you can export the diagram to PNG, SVG, PDF or Visio.
Graphviz network diagram
Save as a .dot or .gv file and render it with Graphviz into an image, or feed it into your own scripts and documentation. Because it is plain text, you can keep it in version control and see how the topology changes.
Neighbors you did not scan are still shown
Devices that SwitchMiner saw as neighbors but did not scan are drawn with dashed outlines, so you can see what is missing from your list. To keep a large diagram readable, hide access points, phones or other device types.
From the Windows GUI or the console
In the Windows GUI, choose .drawio or .dot in Save As, or set it in Options. On the console, use --topology FILE, which works the same on Windows and Linux.
See what changed since the last scan
Compare two scans to find new devices, devices that moved to another port or switch, and ports whose settings changed. It works as a network change detection and audit tool, by hand or on a schedule.
Compare two scans
SwitchMiner lists the devices that are new or missing, the endpoints (MAC addresses) that appeared, disappeared or moved, and the port values that changed, such as VLAN, speed, duplex or status. Error counters and last-change times are left out, because they change on a healthy network all the time.
Keep a scan history
Save each scan as a dated JSON file in a history folder, then compare with the newest one on the next run. In the Windows GUI, turn on Scan history in Options and use File > Compare with Earlier Scan. On the console, use --history DIR and --compare-last.
Run it every day
The console exits with code 4 when differences are found, so Task Scheduler or cron can alert you when a device moves or a port changes. The differences are printed as a report and added to the Excel file as a Changes sheet.
Rescan one switch
Rescan a single switch and compare it with a scan of the whole network. SwitchMiner compares only the switches you scanned and does not report the others as missing.
What SwitchMiner finds on each port
The port
- Interface name and description
- Operational status and last change
- Speed and duplex, operational and admin
- Interface MTU
- Error counters, with high counts highlighted
- Spanning tree state, so blocked uplinks are visible
- A flag on access ports with more than 3 MAC addresses (a switch or hub?)
- Native VLAN and the neighbor on the other end of each link
VLANs
- VLAN number, data and voice
- VLAN name, data and voice
The devices on it
- Every MAC address, so you see the PC and the phone behind it
- OUI manufacturer, with a built-in download of the current MAC vendor list
- IP addresses
- DNS and NBT computer names
- User and domain info
Neighbors and scanning
- CDP and LLDP neighbor details for uplinks and connected switches
- Ping sweep before the scan
- Uplink port consolidation
- Search for one MAC address to find its switch port
- Inventory sheet with model, serial number, software version and uptime for every switch and stack member
- Network topology diagram for draw.io or Graphviz
- Compare a scan with an earlier one and list what changed
Audit reports in the spreadsheet
Tick the extra sheets you want in Options, or name them with --reports on the console. They are built from the same scan, so there is nothing more to collect.
Unused ports
- Find unused switch ports: down ports that have not changed for 90 days (you set the number of days)
- Reclaim ports and plan switch capacity
Link mismatches
- Speed or duplex that differs at the two ends of a CDP or LLDP link
- Trunk or allowed VLAN lists that differ between neighbors
- A Links sheet with both ends of every connection
Port hygiene and duplicates
- Ports in use with no description
- VLANs and voice VLANs with no name
- Ports running half duplex
- The same MAC address on more than one port
What network engineers say
Best Cisco switch port mapping program out there! THIS ONE WORKS.
This program works - and fast.
Works great, helped me debug a switch.
Release news
Older notes and every download are on the SourceForge news page.
SwitchMiner 5.30
Compares two scans and lists what changed, with a scan history for daily change detection. Draws a network topology diagram from CDP and LLDP neighbors for draw.io or Graphviz. Adds Unused Ports, Port Hygiene, Link Mismatch, Links and Duplicate MACs sheets to the Excel report, SHA-224 to SHA-512 authentication for SNMP v3, custom ping sweep ranges, and quick filters and column presets in the GUI. Scans are faster: a discovery scan of 24 switches went from 226 to 57 seconds. See the downloads.
SwitchMiner 5.10
Adds Arista switch support, an Inventory sheet with model, serial number, software version and uptime, a Port Flag column for access ports with more than 3 MAC addresses, and a formatted Excel report that highlights err-disabled and blocked ports. Fixes error counters that could show negative numbers. See the full list of changes.
SwitchMiner 5.00
One code base, three programs: a Windows GUI with saved SNMP profiles and one tab per switch, a Windows command-line version, and a portable Linux command-line version that needs no installation. Read the full announcement.
SwitchMiner 4.21
Fixed a bug with certain switch models running IOS versions that mishandle unsupported OIDs, and fixed a crash.
SwitchMiner GUI 4.20
Added a device info sidebar and fixed various bugs.
SwitchMiner GUI 4.10
Added support for SNMP v3 and fixed various other bugs.
SwitchMiner GUI 4.00
A Win32 GUI version of the product.
Common questions
Quick answers about mapping switch ports with SwitchMiner. For anything else, ask on the discussion board.
How do I find which switch port a device is plugged into?
Scan the switch with SwitchMiner. It reads the MAC addresses learned on every port over SNMP and matches them to IP addresses and computer names, so you can see what is on each port. To look up a single device, use the --search option with its MAC address.
How do I map all the ports on a Cisco switch?
Enter the switch address and your SNMP community or v3 credentials, then scan. SwitchMiner lists each port with its status, speed, duplex, VLAN and the devices behind it, and saves the result as an Excel or CSV file.
How do I create a network diagram from my switches?
Scan your switches with CDP and LLDP discovery turned on, then save the results as a .drawio file (opens in draw.io or diagrams.net) or a .dot file (for Graphviz). In the console, use --topology FILE. The diagram shows each switch, the links between them and the access points around them, and you can edit it afterwards.
How do I find unused ports on a switch?
Turn on the Unused Ports sheet in Options, or use --reports with --unused-days on the console. It lists ports that are down and have not changed for the number of days you choose, 90 by default.
How do I find a duplex or speed mismatch between switches?
The Link Mismatch sheet compares the two ends of every CDP or LLDP link and lists those where speed, duplex, trunk mode or allowed VLANs differ. The Port Hygiene sheet also lists ports running half duplex.
How can I tell what changed on my network between two scans?
Save each scan, then compare a new scan with an earlier one. SwitchMiner lists new and missing devices, endpoints that moved to another port or switch, and changed port values. In the GUI, use File > Compare with Earlier Scan. On the console, use --compare FILE, or --history DIR with --compare-last to run it every day.
Can it scan many switches at once?
Yes. Load a text file with a list of switches and choose how many threads to use. With CDP discovery turned on, SwitchMiner also finds neighboring switches and scans them.
Does it work with Arista or other switch brands?
Yes for Arista: ports, speed, VLANs, MAC addresses, LLDP neighbors and counters. Other vendors that follow the standard SNMP bridge MIBs are scanned with the standard data only, and that has not been tested on real hardware yet. SwitchMiner detects the vendor automatically.
Which SNMP versions does it support?
SNMP v1, v2c and v3, including MD5, SHA and SHA-2 (SHA-224, SHA-256, SHA-384 and SHA-512) authentication and DES and AES (128, 192 and 256-bit) privacy. If you use v3, the switch needs a group with a “vlan-” context match prefix, or very few MAC addresses will come back.
SNMP v1 and v2c send the community string in clear text, so anyone who can capture traffic on the network can read it. Use v3 with authentication and privacy whenever your switches support it, and use a read-only community if you must use v1 or v2c.
What file formats can it export?
Excel (.xlsx), as one workbook with a sheet for each switch plus an Inventory sheet and the audit sheets you choose, and CSV. In Excel the header row is frozen, filters are on, and problem ports such as err-disabled or spanning tree blocked ones are colored. The Windows GUI can also save results as text, and the topology can be saved as a draw.io or Graphviz diagram. The console can also write a scan as JSON for scripts and for comparing scans.
Does SwitchMiner run on Linux?
Yes. Version 5 includes a single portable command-line program for Linux that needs no installation. It requires x86_64 and glibc 2.28 or newer.
Is it free?
Yes. SwitchMiner is open source under the GNU General Public License version 3, and the source code is available to download.
Get SwitchMiner
Version 5.30, released November 15, 2026. Free for everyone, licensed under the GNU General Public License version 3.
-
Download for Windows
Windows
The Windows GUI (
smgui.exe) and the command-line program (sm.exe). Tested on Windows 11. It is a 32-bit program that also runs on 64-bit Windows. 8.0 MB zip. -
Download for Linux
Linux
A single portable command-line program (
sm) with nothing to install. There is no GUI on Linux. 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.8 MB. -
Download source
Source code
The 5.30 source as a tar.gz, 1.2 MB. A SHA256 checksum file is available to verify your downloads.
Looking for an older release? Version 5.10, Version 5.00, Version 4.x and all other files are still on SourceForge.