cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
39697
Views
75
Helpful
32
Replies

Dump a list of LWAPP's including Serial #'s

lcnorwood
Level 1
Level 1

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...

32 Replies 32

Thank you for the information, that was very helpful, I will have to explore Python scripting some more.

Can you tell me what version of Notepadd++ ?  I'm not seeing that plugin.  

KEN HAGEN CCIE#56460
SENIOR NETWORK ENGINEER | PSA
SEATTLE CITY LIGHT
M: 206-459-0027 | ken.hagen@seattle.gov
We Power Seattle seattle.gov/city-light

Patrick,
I know this was several years ago, but I was wondering if this script can be modified to pull that Mac Address as well.

Here is what I came up with, but it doesn't seem to work, any ideas?

editor.rereplace(r"(^AP Serial Number.*)", r"\1\r\n#")

editor.rereplace(r"^Cisco AP Name\.+ (.*)|^IP Address\.+ (.*)|^Mac 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")

Hi, 

This script will include the Mac Address:

 

editor.rereplace(r"(^AP Serial Number.*)", r"\1\r\n#")

editor.rereplace(r"^Cisco AP Name\.+ (.*)|^IP Address\.+ (.*)|^Mac Address\.+ (.*)|^AP Serial Number\.+ (.*)|(?:\w|[-,:./\_()~*$@<>?% ])+", r"\1\2\3\4\5")

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")

Still helping 10 years later, thanks Patrick

darin.gottman1
Level 1
Level 1

I used grep include "Cisco AP Name|AP Model|AP Serial Number" "show access-point-config" to get the results that I needed.  Logged it to a file in my terminal application and then used that file to get the data into Excel.

The grep solution worked great. I added BSSID to get the Base MAC address.
grep include "Cisco AP Name|MAC Address|BSSID|AP Model|AP Serial Number" "show access-point-config"

p.juarezponte
Level 1
Level 1

Hello team,

I know this is an old post but it helped me a lot.

I am trying to get "Vlan support" from all APs.

Is there any way to get all the output at once?

 

(Cisco Controller) >
(Cisco Controller) >
(Cisco Controller) >config paging disable


(Cisco Controller) >grep include "FlexConnect Vlan mode|Cisco AP Name|AP Model" "show access-point-config"
Press any key to continue..
Cisco AP Name.................................... Hiper_Lucena_Flex_AP13
AP Model......................................... AIR-CAP1702I-E-K9
FlexConnect Vlan mode :.......................... Enabled
Press Enter to continue or <ctrl-z> to abort

Cisco AP Name.................................... Market_Ramblas_Flex_AP05
AP Model......................................... AIR-CAP1702I-E-K9
FlexConnect Vlan mode :.......................... Enabled
Press Enter to continue or <ctrl-z> to abort

Cisco AP Name.................................... Market_Leyre_Flex_AP03
AP Model......................................... AIR-CAP1702I-E-K9
FlexConnect Vlan mode :.......................... Enabled
Press Enter to continue or <ctrl-z> to abort

 

 

I have more than 4500 devices and I am trying to get this output and parse it from a script.

Could I disable that "Press enter to continue" in every AP?

You can’t disable that, but in your script, you can send a carriage return.
-Scott
*** Please rate helpful posts ***

Hello Scott,

I am so sad to hear that.

I have written a script ant it took 288s to check just 10 APs (testing for now).

I will deploy it to check all our devices (as I said more than 4500) and I guess it will take a few hours.

Is there any other way to check this (any other command on WLC)?

I don't know if someone could me to improve this code (by using python 3 and netmiko library):

def chequeo():
    # Chequeo de logg
    print(f"Chequeando equipos")
    output = "Press Enter"
    max_loops = 10
    contador = 1
    while "Press Enter" in output and contador < max_loops:
        print(f"Chequeando antena {contador}")
        output = connection.send_command_w_enter('grep include "FlexConnect Vlan mode|Cisco AP Name|IP Address|AP Model" "show access-point-config"')
        if "Disabled" in output:
            lineas = output.splitlines()
            for linea in lineas:
                if linea.startswith("Cisco AP Name"):
                    antena = linea.split()[-1]
                elif linea.startswith("AP Model"):
                    modelo = linea.split()[-1]
                elif linea.startswith("IP Address....."):
                    ip = linea.split()[-1]
            diccionario = {"antena": antena, "modelo": modelo, "ip": ip}
            fallos.append(diccionario)
            print(f"Añadiendo {antena} en la lista")
        contador += 1

The problem is checking that answer from wlc is so so so so slow.

 

My goal is to get an output file as this (which I am getting, just need to do it faster):

Fecha                          antena                                 ip                            modelo
2020-12-19 Hiper_Lucena_Flex_AP13        10.84.199.33         AIR-CAP1702I-E-K9
2020-12-19 Market_Alcala396_Flex_AP02 10.200.210.232     AIR-CAP1702I-E-K9

Well there is no faster way if you are using ssh. If you had Prime Infrastructure, you can run a report or even create a cli script. Prime would issue the command to multiple controllers at a time. Ansible would be another automation tool. Have you tried to just run the commands without grep and just get the data. Then you can grep the file and output what you want using regex to another file.
-Scott
*** Please rate helpful posts ***

Hello Scott,

When you send that command without greps, you need to press enter after every AP too.

Even when paging disable is enabled.

Believe me, I would love that this device did not work in that way.

I got the output file manually and then I could parse that output, but I am trying to make a full automatic job.

 

I understand, but you need to just automate how you are comfortable. Grep always takes time to execute and parsing at the same time does also. It’s not about speed, it’s more about getting all the data you need. I have ran automation scrips for 30,000+ access points just to get data that I can manipulate in various ways after it was collected. These took hours to complete, but at the end, I had the data I needed.
-Scott
*** Please rate helpful posts ***

Hello Scott,

I would love if you could share how can you take all the output.

I am not able to get it., as I said I have to press a key after every configuration AP.

And my script always stop when I have taken 2256 APs (35 minutes).

Can't understand why. 

Is there any way to get all AP configuration with just one command?

I could parse that output after, no problem.

Well maybe you are running into an issue on one controller that is failing your automation process. How many controllers do you have, because that matters more if something fails on a specific controller.
-Scott
*** Please rate helpful posts ***
Review Cisco Networking for a $25 gift card