10-05-2015 11:07 AM - edited 03-08-2019 02:04 AM
Hi,
Is there anyway to restrict access to a port on a WS-C2960X-48FPS-L switch running Version 15.0(2)EX1 based on time of day? Essentially, we want this port to be shut after production hours. Can I set up time restrictions on a port?
Rick
10-05-2015 12:21 PM
Hi
you could assign the ports to a specific vlan and then apply an extended time based access-list to the vlan interface lock traffic in/out at those times that could work for you as i dont think the mac acls can do time based
http://www.cisco.com/c/en/us/support/docs/wireless-mobility/wireless-lan-wlan/68097-accesspt.html#timeacl
10-06-2015 06:31 AM
Thanks, Mark. My switch has EEM on it so I configured an applet that shuts the port down at a certain time every day, and brings it back up every morning. I tested it and it works well.
Rick
10-06-2015 06:38 AM
Ah good thinking EEM is good way to do it
08-01-2016 05:42 AM
Disclaimer
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
Liability Disclaimer
In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Posting
BTW, do you need to deal with DST transitions? Do you use NTP to keep you switch's time accurate?
08-02-2016 01:00 PM
Joseph,
I do not deal with DST transitions and we do use NTP.
07-31-2016 03:46 PM
I"m new to Cisco and I am willing to do all work necessary to find the answer, but I don't know where to start. How do I install or use EEM and, if you don't mind, can you send the list of commands to me to setup time restrictions? I am looking to do the same thing for my kids at bed time.
Thanks.
08-02-2016 12:59 PM
nateg,
I don't know how to install EEM because my switch came with it. Run the "sho event manager ?" command to see if it is already installed. Below is the commands I use to shut down a particular port Monday - Friday at 3:30pm:
event manager applet shut_Reception_PC_Phone_Port_Weekday
event timer cron name shut_Reception_Area_weekday cron-entry "30 15 * * *"
action 1 cli command "configure terminal"
action 2 cli command "interface gi1/0/12"
action 3 cli command "shutdown"
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