You can use time ranges to control when an ACL rule is in effect. For example, if the device determines that a particular ACL applies to traffic arriving on an interface, and a rule in the ACL uses a time range that is not in effect, the device does not compare the traffic to that rule. The device evaluates time ranges based on its clock.
A time range contains one or more rules. The two types of rules are as follows:
This example will create a time-range named: workday-daytime. There is a description: workday at the entry 10.
At the entry 20, we configure a periodic time-range for weekdays from 00:00:00 to 23:59:59.
This time-range is used in group named TimeRange_RCtrlGrp, which is consumed by switch named: netascode-leaf1.
Terminal window
switch(config)# time-range workday-daytime
switch(config-time-range)# 10 remark workday
switch(config-time-range)# 20 periodic weekdays 00:00:00 to 23:59:59
This example will create a time-range named: independance-day.
At the entry 10, we configure a absolute time-range from the July 4, 00:00:00 to July 4, 23:59:59.
This time-range is used in group named TimeRange_RCtrlGrp, which is consumed by switch named: netascode-leaf1.
Terminal window
switch(config)# time-range independance-day
switch(config-time-range)#10 absolute start 00:00 4 July 2024 absolute end 23:59:59 4 July 2024