Schedule WLAN on C9800

Catalyst 9800 控制器内置了对 WLAN 可用性调度的支持。当 WLAN 被禁用时,AP 不会广播 SSID,并且信道利用率会降低。此外,它还可以作为安全增强功能来实现,以防止客户端设备在指定时间进行连接。在开始之前,请仔细检查控制器上的时间设置,启用 NTP 客户端并设置正确的时区。

选项 1:内置日历配置文件(calendar-profile)
我的示例启用每周上午 9 点到下午 5 点映射到“default-policy-profile”的所有 WLAN。在这些时间之外,SSID 将无法供客户端加入。

configure terminal
!
wireless profile policy default-policy-profile
shutdown
!
no wireless profile calendar-profile name WEEKDAYS-9-TO-5
!
wireless profile calendar-profile name WEEKDAYS-9-TO-5
day monday
day tuesday
day wednesday
day thursday
day friday
recurrence weekly
start 09:00:00 end 17:00:00
!
wireless profile policy default-policy-profile
calendar-profile name WEEKDAYS-9-TO-5
action wlan_enable
no shutdown
!

确认
您可以使用 Wi-Fi 客户端进行验证。如果您执行“show wlan summary”,WLAN 仍将显示为“Enabled”,这是预期的。要验证日历配置文件控制的 WLAN 的当前状态,请使用“show logging | include SCHEDULED_WLAN”。

配置参考:https://www.cisco.com/c/en/us/td/docs/wireless/controller/9800/17-3/config-guide/b_wl_17_3_cg/m_deny_wireless_client_session_estbl.html#id_109520

选项 2:EEM 脚本
如果您喜欢灵活性,那么由 CRON 触发的在控制器上运行的 EEM 脚本可能更适合您。

event manager applet EEM_SCHEDULE_WLAN_UP
event timer cron cron-entry "0 9 * * 1-5" name 9_AM_MON_TO_FRI
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "wlan MY_SSID"
action 4.0 cli command "no shut"
action 5.0 cli command "end"
action 6.0 syslog msg "Scheduled WLAN_SSID has been enabled"

event manager applet EEM_SCHEDULE_WLAN_DOWN
event timer cron cron-entry "0 17 * * 1-5" name 5_PM_MON_TO_FRI
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "wlan MY_SSID"
action 4.0 cli command "shut"
action 5.0 cli command "end"
action 6.0 syslog msg "Scheduled WLAN_SSID has been disabled"

这里有一些有用且实用的EEM示例供您参考。

https://community.cisco.com/t5/wireless-mobility-knowledge-base/automated-backup-ssid-with-eem-on-catalyst-9800-wireless/ta-p/3743838

https://community.cisco.com/t5/networking-knowledge-base/cisco-eem-basic-overview-and-sample-configurations/ta-p/3148479

原文:https://www.jiribrejcha.net/2020/08/schedule-wlan-availability-on-catalyst-9800-series-wireless-lan-controllers/

posted @ 2023-08-14 16:12  剪刀石头布Cheers  阅读(97)  评论(0编辑  收藏  举报