How to list the free ports on a switch, and across the fleet

To list the free ports on a switch, read the status of every physical port and keep the ones that are not up. Doing it on one switch takes one command; doing it for a hundred switches is where the time goes. NacTrack reads the port status at every collection, so the same answer comes for one device or for the whole fleet, with a per-device count of ports in use and free in the Capacity report. A port that is down today is a candidate, not a certainty.

What you need

  • Licence module: inventory.
  • Role permission: view the inventory.
  • Every collected platform. The Capacity report also needs the reporting module and the view_reporting permission.

In NacTrack

  1. 1

    Open Inventory, then Ports

    The Ports page lists every collected port. Pick one switch in the device filter, or leave it on All devices to search the whole fleet at once. Only physical ports is ticked by default, which keeps VLAN interfaces and loopbacks out of the count.

    Screen: app.nactrack.com/inventory/interfaces

  2. 2

    Filter the Status column

    Type in the search box of the Status column. The match is on part of the text, so "down" also returns ports that are administratively down: type the exact value the vendor uses when you want only one of them. Export the result to Excel or CSV; the full export fetches every matching row, up to ten thousand.

    Screen: app.nactrack.com/inventory/interfaces

  3. 3

    Open the Capacity report for the fleet

    Under Reporting, the Capacity report counts physical ports per device: total, in use, free, administratively down, and utilisation. In use means the port is up. Everything else, administratively down and err-disabled included, counts as free capacity.

    Screen: app.nactrack.com/reporting

By hand, without NacTrack

On a Cisco IOS or IOS XE switch, "show interfaces status" prints one line per port with a Status column: connected, notconnect, disabled or err-disabled. Cisco's errdisable note uses this same command to find err-disabled ports. To judge how long a port has been idle, "show interfaces" gives a Last input value per port.

On Huawei VRP, "display interface brief" gives the physical and protocol state of each port. Either way, the command answers for one switch at a time: the fleet answer is the same command run on every switch and merged by hand.

Try the same thing on your own estate