08-25-2008 06:57 AM - edited 07-03-2021 04:22 PM
Hi all,
I need to change via SNMP v2C the value of the PSK for WPA/WPA2 for a specific SSID.
How can do that ?
Tnx a lot for an answer
08-26-2008 07:28 AM
Do you have a wireless control server? It would do it for you. Otherwise, you would have to determine the proper OIDS & other info and use an snmpset to do it via snmp 2c read/write community. You would most likely have to snmpwalk the controller and weed out the correct string to get the values for the ssid
08-26-2008 07:32 AM
Hi eric,
tnx for the answer
actually I don't usa a WCS.
But if it can simplify my life about SNMP for WLC... why not.
08-26-2008 07:40 AM
The WLC will make your life easier as you add more controllers & APs. I have 4 controllers and the WCS, but still make my changes on the controllers out of habit.
10-26-2009 05:17 AM
The method I have used is;
snmpwalk -c
This will return an index list of the SSID's that you have defined on the controller. Ie;
SNMPv2-SMI::enterprises.9.9.512.1.1.1.1.4.1 = STRING: "Widget Inc."
SNMPv2-SMI::enterprises.9.9.512.1.1.1.1.4.2 = STRING: "Guest"
SNMPv2-SMI::enterprises.9.9.512.1.1.1.1.4.3 = STRING: "Lab"
Then, set the PSK of the SSID based on the index value (the last number in the OID) ;
ie.
snmpset -c
where x is the index value.
So, for example to set the Guest SSID for controler 10.10.1.1;
snmpwalk -c
returns;
SNMPv2-SMI::enterprises.9.9.512.1.1.1.1.4.1 = STRING: "Widget Inc."
SNMPv2-SMI::enterprises.9.9.512.1.1.1.1.4.2 = STRING: "Guest"
2 is the index value for the Guest SSID.
To set the PSK to 0011001100 (not recommeneded!) then;
snmpset -c
I hope that explains it easily enough.
If anyone can find a way of reading back the PSK once set, I'd be grateful! I haven't been able to do that yet!
02-01-2016 12:56 AM
If someone need to change PSK key for WLAN using SNMP, the working example is bellow. I hope this save time for somebody and you can take a cup of coffie instead spend time in Google, trying to find correct solution.
1) First of all using snmp we can get id of each existing WLAN:
snmpwalk -v 2c -c test123 x.x.x.x enterprises.9.9.512.1.1.1.1.4
SNMPv2-SMI::enterprises.9.9.512.1.1.1.1.4.1 = STRING: "WLAN1"
SNMPv2-SMI::enterprises.9.9.512.1.1.1.1.4.2 = STRING: "WLAN2"
SNMPv2-SMI::enterprises.9.9.512.1.1.1.1.4.3 = STRING: "WLAN3"
SNMPv2-SMI::enterprises.9.9.512.1.1.1.1.4.4 = STRING: "WLAN4"
SNMPv2-SMI::enterprises.9.9.512.1.1.1.1.4.5 = STRING: "WLAN5"
SNMPv2-SMI::enterprises.9.9.512.1.1.1.1.4.6 = STRING: "WLAN6"
2) Than, we can set PSK for specific WLAN using this command:
snmpset -v 2c -c test123 x.x.x.x enterprises.9.9.521.1.1.1.1.7.5 i 3 enterprises.9.9.521.1.1.1.1.8.5 s "94621518"
where
"test123" - snmp RW community
"94621518" - new PSK for our WLAN
"x.x.x.x" - WLC IP-address
P.S. Tested on Cisco AIR-CTVM-K9 with OS version - "8.1.102.0"
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