cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1756
Views
5
Helpful
7
Replies

Can I limit access to a switch port base on time-of-day?

rweir0001
Level 1
Level 1

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

7 Replies 7

Mark Malone
VIP Alumni
VIP Alumni

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

 

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

Ah good thinking EEM is good way to do it

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?

Joseph,

I do not deal with DST transitions and we do use NTP.

nateg.iphone
Level 1
Level 1

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.

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"

Review Cisco Networking products for a $25 gift card