Categories
Non classé

Cisco C9800 Access point inventory script

Today I am sharing a Python script I wrote to get an access point inventory from one or more Cisco Catalyst 9800 WLAN controllers. It connects to the C9800 using the RESTCONF API, so don’t forget to first enable the API on the controller as it is disabled by default. All prerequisites and instructions are on the GitHub link.

Why would you want an AP inventory on Excel?

I mostly use this script in 2 situations:

  • On-site Wi-Fi survey: I can quickly get channels, transmist powers, radio MAC addresses… of all access points before I go out measuring.
  • Access points migration from one controller to the other (N+1 infrastructure) or 9800 upgrades. I get an inventory before and after the migration and can then easily compare the two files. It is very useful if I lose any access point during the migration and I need to check their status. The inventory provides important information such as IP address and LLDP/CDP information of access points so you can quickly identify on which switch & interface a missing AP is plugged in.

The script

The script is on GitHub: https://github.com/jrambeau/cisco-c9800-AP-inventory

Inventory file example

On the same topic… would you care for a back-up configuration script?

I also shared on GitHub a small script that uses SSH/Netmiko to back-up the configuration of one or multiple C9800 controllers (and basically any other IOS-XE device). You can even easily customize the script to get an output of any commands you might need.

Here it is: https://github.com/jrambeau/cisco-c9800-config-backup

Leave a Reply

Your email address will not be published. Required fields are marked *