How-To: Script the renaming of wireless access points

Hellooo wireless gurus!!! Do you deploy hundreds or thousands of Cisco lightweight access points at a time? Do you hate having to click, copy and paste your way through loads of access points on your Wireless LAN Controllers? In the past I’ve gone as far as utilizing a co-worker to remotely rename access points as I hang them. Talk about wasting engineers’ resources?

This write-up is meant to show you how to use Excel 365’s TEXTJOIN feature to most efficiently script the renaming of all the access points in one fell swoop. It does take some time to set up- so if you have anywhere near 50 devices, it may be worth doing it manually. Otherwise, this script will save you a lot of time if you have say… 2-500, 1000 APs or more!

For starters, let’s discuss some crucial steps to planning an access point replacement project:

Old and New Inventory, and a naming scheme:

  1. On your Cisco wireless controller CLI, do a “show ap inventory all” to copy & paste your current AP inventory into excel.
    1. (organize into columns)
    1. This can also be done using Cisco Prime Infrastructure.
      1. Menu, Reports, Report Launch Pad, Device, AP Summary
    1. Either way you may need to scrub the data and remove unneeded columns. (see example below)
  2. Using a handheld scanner, scan the side of all of your AP boxes… Scan in the serial number and mac address of all your new access points
    1. Scan these into their own columns in your working inventory spreadsheet.
  3. If you have asset tags to place on the access points, do that as well & record in your spreadsheet.
  • After inventorying the new APs is complete, you’ll want to give the new APs a name in your spreadsheet (from a new naming scheme or the same name as your existing APs were, if you had a scheme already). 
    • Example above:          
  • In Excel, make SURE to search for and fix any duplicate entries in the spreadsheet!!
  1. In Excel this done by selecting all, and then click the Home tab, Conditional Formatting, Highlight Cells Rules, Duplicate values…

Work Flow of the Installation:

  • Now that inventory is complete – I need to talk about the work flow of your project. Here are some work flow items to be familiar with:
    • Label all your APs with their new names
      • (separate how-to coming on brother label printers and database printing).
      • Asset tag stickers on as well.
    • Hang your APs and hook them up on the ceiling grid.
      • Note1: Assuming you are replacing existing APs & have the old & new in your working spreadsheet.
      • Note2: Assuming that you will be hanging all your APs without renaming them until you script the rename of all of them.
      • Note3: Even if you are putting up a new/greenfield installation, the same workflow applies without the old names. Just determine which APs will go where.
      • Note4: if you are using Cisco Prime, don’t place the new APs on maps yet.

Excel, and building your renaming script

  • NOW we can get into the coolest point of this write-up: The script!
  • The syntax to rename an access point is:

config ap name newapname1 ne:wm:ac:ad:dr:es

  • What we are going to do is use excel to create the repetitive lines of code, but incorporate the names & variable mac addresses from the inventory sheet to complete it the line needed to rename it.
    • By putting the “config ap name ” into Column A, then the new AP names and mac addresses in the subsequent columns we can use the JOINTEXT function to turn them all into one cell throughout the sheet.
  • In excel, organize your columns so the first column has the text “config ap name “ (with a space at the end).
  • Move your New AP Name column next to that in the second position.
  • In column C, create a single space in the first cell, and drag-down to populate the entire column with it.
  • Move your NEWMACADDRESS column to the column D position.
  • Next in the 5th column, use the TEXTJOIN function to concatenate the group of cells in the first row of data together. (in my case it’s row 2, because of the column headers)

= TEXTJOIN(“”, TRUE,A2:G2)

  1. (This is for office 365. If you need to perform this in a previous version, use the =CONCATENATE function)
  2. You will of course know your formula is working right when your cell now possesses a working copy-able script!
  1. Next take the entire column of joined script text and paste it into a Notepad program.
  2. In your wireless controller’s CLI interface, paste one line of code in to ensure you have the syntax, spacing, and everything correct
    1. Then try 5 lines at once to verify they work
    1. Then try 10 lines
    1. Then copy and paste as many lines as you are comfortable with.

Thanks for reading this and I hope it helps you save as much time as it’s helped me. If you would like to see a section re-written or have a screenshot added, please let me know!

Advertisement

How-To: Bulk print labels

How-To bulk print labels from a spreadsheet in

  1. Take a spreadsheet with your label names in 1 column.
    capture4
  2. Make sure that the top cell in that column is a description field.
  3. (Later that cell is needed to drag into the design)
  4. Open your Brother P-Touch software
  5. Create a new label, the size that you need.
  6. Go to File, Database, Connect & browse to your spreadsheet
  7. Note that in P-Touch, your “name” cell has become a kind of a header for the list of 
    capture2
    labels.
  8. Take that header, and drag it up into the blank label.
  9. Drag and align the text box to make it fit.
  10. (when you let go over the label, a popup menu appears. Choose Text.
  11. Next, go to File, Print.
  12. Choose “All Records”
    1. PRINT!   
      capture3
  13. Note: You may need to break out your spreadsheet into multiple files, depending on how much tape you have left on the cassette in your label maker.
  14. If you run out, you will need to modify your spreadsheet to start after the last good label printed, and re-run this process.

(Just set it, and forget it! Until your label tape runs out at least! )

The Journey Begins

cropped-windmill-e1539973049250

Thanks for joining me!

Through my career I have benefited from from some great online resources: most notably the MRNCCIEW site. On there you find a number of things that are pertinent to mid-to-upper career wireless engineers.

Because of my use of that site, I always wanted to use my love for technical writing along with the desire to mentor and give people a “hand up”. That is how I came to start this blog!

I may never have an exhaustive collection of data – but any time I feel like I came across information that would be make someone else’s job easier: I’ll do it! Pay it forward and mentor another tech!