To specify when an access list or other feature is in effect, use the time-range global configuration command. To remove the time limitation, use the no form of this command.
time-range time-range-name
no time-range time-range-name
Syntax Description
time-range-name
Name of a time range. The name cannot contain a space or quotation mark, and must begin with an alphabetic character.
Default
None
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 12.0(1).
The time-range entries are identified by a name, which is referred to by one or more other configuration commands. Currently, only IPX and IP extended access lists use the time-range feature. Multiple time ranges can occur in a single access list or other feature.
After the time-range command, use the periodic command, the absolute command, or some combination of them to define when the feature is in effect. Multiple periodic commands are allowed in a time range; only one absolute command is allowed.
Note: Note that the names for time-range entries and named access lists are different names. To avoid confusion, do not use the same name for both.
Example
The following example denies HTTP traffic on Monday through Friday between the hours of 8:00 am and 6:00 pm. The example allows UDP traffic on Saturday and Sunday from noon to midnight only.
time-range no-http periodic weekdays 8:00 to 18:00 ! time-range udp-yes periodic weekend 12:00 to 24:00 ! ip access-list extended strict deny tcp any any eq http time-range no-http permit udp any any time-range udp-yes ! interface ethernet 0 ip access-group strict in