Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Schedule WLC to on/off AP

Hi,

Just want to check with you. Can we asked WLC to schedule down or up for the AP. For example, during office hour we will up the wireless. When the time is over, WLC will down the AP.

2 REPLIES

Re: Schedule WLC to on/off AP

Not natively that I am aware of. You can either use time-based acls on an upstream router (which will not kill the radio signal) or you can try scripting it on a linux box.

Here is an example of how a script is used to gather info, you can modify the commands to do whatever on the controller.

http://forums.cacti.net/viewtopic.php?t=20030&highlight=wlc

Re: Schedule WLC to on/off AP

I played around with this a bit. here are the details.

You need 2 files, the script and the variables file. Anyone who has ever used mrat will feel right at home with this setup. You will need expect on the server

NOTE: I am not the author, but I have left his info intact for credit

File1: the command file

====== cut below this line ===============

#!/bin/bash

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

path_to_scriptsdir=/usr/share/cacti/scripts

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

=== end cut ===========

File2: the variables

====== cut below this line ===============

#!/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 "password:"

send -- "$password\r"

expect "Controller)"

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

expect "Controller"

send "logout\r"

expect "(y/N)"

send -- "n\r"

expect eof

=== end cut ===========

You can see on line 21 where to place the command you desire, and yes, you will need to keep the syntax at the end.

Forgot to mention: Once you have the script built, you can call it via cron at the desired times

229
Views
0
Helpful
2
Replies
CreatePlease to create content