cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2443
Views
5
Helpful
2
Replies

Scripting on a WLC

gorazd863
Level 1
Level 1

Hello,

I would need to generate a new shared key for a Guest-Wi-Fi and send it to defined e-mail addresses every week.

Does anybody know, is it possible to script it on a WLC?

Gorazd

2 Replies 2

Surendra BG
Cisco Employee
Cisco Employee

AFAIK WLC doent know how to execute the scripts.. I think this is not possible on WLC.. However WCS may help you in emailing the credentials.. here is the link for htat, if you hav a WCS you can use this..

http://www.cisco.com/en/US/docs/wireless/wcs/7.0/configuration/guide/7_0manag.html

lemme know if this answered your question..

Regards
Surendra
====
Please dont forget to rate the posts which answered your question and mark it as answered or was helpfull

Regards
Surendra BG

This is kind of a way to do it via expect under linux

The script was originally cobbled to pull info from the WLC for import into MRTG or Cacti

I am still waiting for Cisco to slap an IOS-like interface on the WLC !

USE AT YOUR OWN RISK

First script:

wlc.exp

#!/usr/bin/expect

set router [ lindex $argv 0]

set username [ lindex $argv 1]

set password [ lindex $argv 2]

spawn ssh $router

set timeout 10

expect "(yes/no)?" {

send "yes\r"; exp_continue }

expect "User:"

send -- "$username\r"

expect "assword:"

send -- "$password\r"

#expect "Controller)"

#send -- "show client summary\ry\ry\r"

#add in your command here with same syntax                          # this is where you would run your command

expect "Controller"

send  "save config"

expect "(y/N)"

send -- "n\r"

expect "Controller"

send "logout\r"

expect "(y/N)"                             

send -- "n\r"

# you will need the above two lines after any command that expects a yes or no confirmation

expect eof

Second file:

#!/bin/bash

#Info: Peter Kok(pk21-at-hotmail.com)  <---- original author

path_to_scriptsdir=/usr/local/bin

# where you place the script

router="$1"

username="$2"

password="$3"

output=$($path_to_scriptsdir/wlc.exp $router $username $password)

#   associated=$(echo $output|grep -o Associated|wc -l)

#   probing=$(echo $output|grep -o Probing|wc -l)

#   authenticated=$(echo $output|grep -o Yes|wc -l)

#   echo -n "asso_clients:$associated prob_clients:$probing auth_clients:$authenticated "

exit 0

Review Cisco Networking for a $25 gift card