12-19-2012 01:42 PM - edited 07-03-2021 11:15 PM
Is there a way from the console or from the web interface to dump a list/inventory of LAP's tied to a particular controller, including IP's and serial #'s?
Trying to save myself a ton of work...
Solved! Go to Solution.
12-21-2012 08:44 AM
Before using the WCS I also did things like that on a regular basis. I found that with Notepad++ and Excel I had the correct tools to get that information fast and in a clear overview.
Anyways,
Log into the CLI of the WLC. Setup your terminal software to send the output directly into a text file.
You can then stop logging the terminal session and quit.
Now this file contains every information you need and more.
For the next step you will need Notepad++ as well as a certain plugin called Python Script and TextFX (the latter one should already come with the editor, if not search the plugins for "TextFX Characters")
You can download it directly via Notepad++ by going to Plugins->Plugin Manager. Under Available search for "Python Script"
Once installed you can write & execute scripts.
Now open up Notepad++ and go again to Plugins->Python Script->New Script. You will be asked for a path where you want to save that script. Once done paste the following code into the script (cannot attach the actual script to this post)
editor.rereplace(r"(^AP Serial Number.*)", r"\1\r\n#")
editor.rereplace(r"^Cisco AP Name\.+ (.*)|^IP Address\.+ (.*)|(?:Primary|Secondary|Tertiary) Cisco Switch (?:Name|IP Address)\.+ (.*)|^AP Serial Number\.+ (.*)|(?:\w|[-,:./\_()~*$@<>?% ])+", r"\1\2\3\4")
editor.selectAll()
notepad.runMenuCommand("TextFX Edit", "Delete Blank Lines")
editor.rereplace(r"(\w)\r\n", r"\1;")
editor.replace(r";#","")
notepad.runMenuCommand("TextFX Edit", "Delete Blank Lines")
It certainly is not perfect as I am not that good in this thing, but it gets the job done. Previously I did all those steps by hand
Save the script and open up the file where you have logged your terminal output and execute the script via Plugins->Python Script->Scripts->your_script.py
Mind you that the finished output might show duplicate entries. That is because the show access-point-config separates an AP by its installed radios. So you will see two entries for a dual band AP.
The script might take some minutes to complete, so just let it run through.
Once complete you are able to export the output to excel and use the "text to columns" feature where you chose the semicolon as separator. Before you can run "Remove Duplicates" so you get rid of the redundant entries.
Now you should have a file where you have all the informations you need.
HTH
Regards,
Patrick
12-19-2012 02:04 PM
Without WCS/NCS/CPI? No.
12-19-2012 03:59 PM
While a bit cumbersome; it's feasible. It would require some legwork and post-collection formatting. From the CLI...
To see list of AP names and IPs you could perform
>show dtls connections
Any AP that has CAPWAP control path up (joined to WLC) would appear here with AP name and "Peer IP"
For pulling serial number; this is pretty tedious, but you could script this out
You would need to execute the following for each ap
>debug ap enable
>debug ap command "show ver | inc Serial"
May even try "PCB Serial Number" as the "include" for relevant SN
You will get some extra outputs regarding the WLC task, timestamps, and MAC, but you will see the value of this "command" returned to the WLC screen afterwards.
Again, this isn't pretty, but can it be done; yes. Leo's suggestions would be much easier
12-19-2012 11:54 PM
You could run this command also
show ap config general
Sent from Cisco Technical Support iPhone App
12-20-2012 09:35 AM
Making it easy on him eh? Good call Scott.
12-20-2012 09:39 AM
I still don't think that is easy... you would need to take that data an run it through something that might be able to just export what you need... I would not want to have to go through a list of even 100 of these:)
Thanks,
Scott
Help out other by using the rating system and marking answered questions as "Answered"
12-20-2012 09:41 AM
Yeah, easy is always awesome. i'm curious if this would show in a show tech. I don't mind digging a little for the info, but don't want to do a bunch of tedious commands, as we're in the middle of doing our smartnet renewals (No, not everything was purchased with smartnet GRRR)
Come on cisco, isn't there a way to make this easier?
12-20-2012 09:44 AM
It will... but if you have a lot of AP's, you better watch the CPU when you issue that command.. by a lot, I mean 1000+
Thanks,
Scott
Help out other by using the rating system and marking answered questions as "Answered"
12-20-2012 09:47 AM
We're under 100 for the moment.
12-20-2012 11:03 AM
The show tech didn't work.
12-20-2012 11:22 AM
show run-config has the info
Thanks,
Scott
Help out other by using the rating system and marking answered questions as "Answered"
12-21-2012 08:44 AM
Before using the WCS I also did things like that on a regular basis. I found that with Notepad++ and Excel I had the correct tools to get that information fast and in a clear overview.
Anyways,
Log into the CLI of the WLC. Setup your terminal software to send the output directly into a text file.
You can then stop logging the terminal session and quit.
Now this file contains every information you need and more.
For the next step you will need Notepad++ as well as a certain plugin called Python Script and TextFX (the latter one should already come with the editor, if not search the plugins for "TextFX Characters")
You can download it directly via Notepad++ by going to Plugins->Plugin Manager. Under Available search for "Python Script"
Once installed you can write & execute scripts.
Now open up Notepad++ and go again to Plugins->Python Script->New Script. You will be asked for a path where you want to save that script. Once done paste the following code into the script (cannot attach the actual script to this post)
editor.rereplace(r"(^AP Serial Number.*)", r"\1\r\n#")
editor.rereplace(r"^Cisco AP Name\.+ (.*)|^IP Address\.+ (.*)|(?:Primary|Secondary|Tertiary) Cisco Switch (?:Name|IP Address)\.+ (.*)|^AP Serial Number\.+ (.*)|(?:\w|[-,:./\_()~*$@<>?% ])+", r"\1\2\3\4")
editor.selectAll()
notepad.runMenuCommand("TextFX Edit", "Delete Blank Lines")
editor.rereplace(r"(\w)\r\n", r"\1;")
editor.replace(r";#","")
notepad.runMenuCommand("TextFX Edit", "Delete Blank Lines")
It certainly is not perfect as I am not that good in this thing, but it gets the job done. Previously I did all those steps by hand
Save the script and open up the file where you have logged your terminal output and execute the script via Plugins->Python Script->Scripts->your_script.py
Mind you that the finished output might show duplicate entries. That is because the show access-point-config separates an AP by its installed radios. So you will see two entries for a dual band AP.
The script might take some minutes to complete, so just let it run through.
Once complete you are able to export the output to excel and use the "text to columns" feature where you chose the semicolon as separator. Before you can run "Remove Duplicates" so you get rid of the redundant entries.
Now you should have a file where you have all the informations you need.
HTH
Regards,
Patrick
12-21-2012 09:09 AM
Patrick -
That was OUTSTANDING! Thank you very much!
12-21-2012 09:23 AM
Patrick ..
Hit me up in PM .. I would like to ask you a question ..
__________________________________________________________________________________________
"Satisfaction does not come from knowing the solution, it comes from knowing why." - Rosalind Franklin
__________________________________________________________________________________________
"I'm in a serious relationship with my Wi-Fi. You could say we have a connection."
12-21-2012 01:04 PM
Nice!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide