Time ranges define when the permit or deny rules in an ACL are in effect, for example, during a specified period of time or on specified days of the week. This allows network administrators to configure different policies during different time ranges for network optimization.
Time ranges associated with ACL rules are classified into:
Periodic time range: defined by week. That is, ACL rules can take effect at an interval of one week. For example, if the time range of ACL rules is 8:00-12:00 on Monday, the ACL rules take effect at 8:00-12:00 on every Monday.
Absolute time range: defined by a period of time, in the format of from YYYY/MM/DD HH:MM to YYYY/MM/DD HH:MM. That is, ACL rules take effect only during this period.
You can define time-name and specify multiple time ranges for it. When only periodic or only absolute time ranges are configured, the OR logical operator is used to calculate the effective time range. When both periodic and absolute time ranges are configured, the AND logical operator is used to calculate the effective time range. If configured periodic or absolute time ranges do not overlap with each other, all of them are effective. If a periodic time ranges conflicts with an absolute time range, the configured time ranges do not take effect.
# time-range test 8:00 to 18:00 working-day time-range test 14:00 to 18:00 off-day time-range test from 00:00 2014/01/01 to 23:59 2014/12/31 # acl number 2001 rule 5 permit time-range test
Therefore, the time range test is effective during 8:00-18:00 on Monday to Friday and 14:00-18:00 on every Saturday and Sunday in 2014.
If time range 3 is modified as from 2014-1-1 19:00 to 2014-12-31 21:00, the time range test is ineffective.