Time Range Configuration
Table of Contents
Chapter 1 Configuring Time Range..............................................................................................................1
1.1 Time Range Introduction................................................................................................................. 1
1.1.1 Overview................................................................................................................................. 1
1.1.2 Absolute Time Range........................................................................................................... 1
1.1.3 Periodic Time Range.............................................................................................................1
1.1.4 Isolating Time Range............................................................................................................ 1
1.1.5 From-to Time Range............................................................................................................. 1
1.1.6 Activating Time Range..........................................................................................................2
1.2 Time Range Configuration Task List............................................................................................. 2
1.3 Time Range Configuration Task.....................................................................................................2
1.3.1 Adding/Deleting Time Range...............................................................................................2
1.3.2 Adding/Deleting Absolute Time Range.............................................................................. 3
1.3.2 Adding/Deleting Periodic Time Range............................................................................... 3
1.3.4 Applying Time Range............................................................................................................4
1.3.5 Monitoring the configuration and state of Time Range....................................................4
1.4 Configuration Example.....................................................................................................................5
Time Range Configuration
Chapter 1 Configuring Time Range
1.1 Time Range Introduction
1.1.1 Overview
Time Range is a time module controlling the effective time and the failure time of a function (For
instance, expansion IP access control list).
Time Range can play its role only when cooperating with other modules which support the Time
Range function.
Time Range is consisted of separate time ranges. These time ranges have two kinds: one is
absolute and the other is periodic. Of these, periodic is classified into two kinds further: isolate and
from-to.
The whole system has many Time Ranges. Each Time Range is differentiated according to their
names(case sensitive). Each Time Range has at most only one absolute time range but many
periodic time ranges.
1.1.2 Absolute Time Range
Absolute Time Range is a time range starting and ending with concrete date and time (The
Absolute Time Range without concrete starting date and time is taken as the current time; the
absolute time range without concrete ending time is taken as effective forever.). For example, 08:08
8 8 2008 - 10:10 10 10 2010 is an absolute time range.
1.1.3 Periodic Time Range
Periodic Time Range is a back-and-forth time range. It has no concrete starting time and ending
time, but it has concrete starting week and moment and ending date and moment. For example, a
periodic time range starts from 20:00~21:00 on every Tuesday, Thursday and Sunday; or starts
from 09:00 on every Tuesday to 18:00 on every Thursday. More examples such as 09:00~10:00 in
every weekend; 23:00~07:00 everyday; and 09:00~18:00 on weekdays.
1.1.4 Isolating Time Range
Isolate Time Range is one type of Periodic Time Range. It is periodical. And its starting time and
ending time will not span 24 hours. For example,19:00~19:30 on every Monday is an isolate time
range; 20:00~21:00 on every Tuesday, Thursday and Sunday is an isolate time range; but time
from 09:00 on Tuesday to 18:00 on every Thursday is not an isolate time range, but "from-to time
range" described below.
1.1.5 From-to Time Range
-1-
Time Range Configuration
From-to Time Range is also a type of Periodic Time Range. It is periodical. Moreover, its starting
time and ending time must span at least 24 hours. For example, time from 09:00 on Tuesday to
18:00 on every Thursday is a from-to time range.
1.1.6 Activating Time Range
A Time Range can have the absolute time range and periodic time range simultaneously. The state
of Time Range can be divided into 4 situations according to whether the absolute time
range/periodic time range is configured.
Situation 1
If a Time Range neither configure absolute time range nor periodic time range, it is called EMPTY.
The Time Range does not exist activating time range.
Situation 2
If a Time Range doesn't have the absolute time but has periodic time range, the activating time
range of the Time Range is the total time ranges of the periodic time range.
Situation 3
If a Time Range doesn't have the periodic time but has absolute time range, the activating time
range of the Time Range is the total time ranges of the absolute time range.
Situation 4
If a Time Range neither have the periodic time nor the absolute time range, the activating time
range of the Time Range is set intersection of the set union of the absolute time range and all
periodic time range.
The complementary set of the activating time range of a Time Range is considered as
non-activating time range.
If the system time is in an activating time range of a Time Range, the Time Range is active; if a
Time Range has the activating time range but the system time does not in the activating range, the
time range is inactive; if a Time Range does not have the activating time range, the Time Range is
empty.
When a Time Range changes among inactive, active and empty, the Time Range is changed.
Otherwise, the Time Range is unchanged.
1.2 Time Range Configuration Task List
Adding/ing Time Range
Adding/Deleting Absolute Time Range
Adding/ing Periodic Time Range
Applying Time Range
Monitoring the configuration and state of Time Range
1.3 Time Range Configuration Task
1.3.1 Adding/Deleting Time Range
The whole system has many Time Ranges. Each Time Range is differentiated according to their
names (case sensitive).
-2-
Time Range Configuration
Run the following commands to configure Time Range:
Command Purpose
time-range name Add a Time Range named name and enter the
configuration mode of Time Range
exit Exit the configuration mode of Time Range
no time-range name Delete Time Range named name
Note:
1. If the system has Time Range named name, run command time-range name to enter the
TimeRange configuration mode, but not create the new TimeRange.
1.3.2 Adding/Deleting Absolute Time Range
Each TimeRange has only at most only one absolute time range. Absolute Time Range can have
the starting time and the ending time simultaneously or it has the ending time but not the starting
time, or it has the starting time but not the ending time. When the absolute time has no starting time,
the current time is the starting time; when the absolute time has no ending time, the absolute time is
effective forever.
To configure the absolute time range, run the following command:
Command Purpose
absolute { Adds an absolute time range
start hour:minute day month year end
hour:minute day month year
| start hour:minute day month year
| end hour:minute day month year }
no absolute Deletes the absolute time range
Note:
1. If a Time Range has the absolute time range, the absolute command modifies the absolute time range.
1.3.2 Adding/Deleting Periodic Time Range
A Time Range can has many periodic time ranges. Each periodic time range is not all the same, but
the time range can overlap.
To configure the periodic time, run the following command:
Command Purpose
periodic { Adds a periodic time range
daily hour:minute to hour:minute
| weekdays hour:minute to hour:minute
| weekend hour:minute to hour:minute
| {Friday | Monday | Saturday | Sunday | Thursday
|Tuesday|Wednesday} hour:minute to hour:minute
-3-
Time Range Configuration
| {Friday | Monday | Saturday | Sunday | Thursday | Tuesday |
Wednesday} hour:minute to {Friday | Monday | Saturday |
Sunday | Thursday | Tuesday | Wednesday} hour:minute }
no periodic [ Deletes a periodic time
daily hour:minute to hour:minute range
| weekdays hour:minute to hour:minute
| weekend hour:minute to hour:minute
| {Friday | Monday | Saturday | Sunday | Thursday
|Tuesday|Wednesday} hour:minute to hour:minute
| {Friday | Monday | Saturday | Sunday | Thursday | Tuesday |
Wednesday} hour:minute to {Friday | Monday | Saturday |
Sunday | Thursday | Tuesday | Wednesday} hour:minute ]
1.3.4 Applying Time Range
A created Time Range can be applied to one or more function modules. At present the Time Range
can only be applied to IP ACL function module.
In order to apply Time Range to IP ACL, you must enter the name of Time Range to the end of the
sub-command of time-range.
Note:
1. Time Range can only be applied to extensible ACL, but not to the standard ACL.
1.3.5 Monitoring the configuration and state of Time Range
To monitor Time Range Configuration, run the following command:
Command Purpose
show time-range Shows the configuration of all Time Range in the
system
show time-range name Shows the configuration of Time Range named
name.
Attach: The result analysis of the command
Take the result of the typical configuration as an example:
Switch_config#show time-range
Now: Date: 2016.3.4 Time: 13:16 Day: Tuesday
time-range entry: x (inactive)
absolute start 12:00 1 January 2008 end 13:00 2 January 2016
periodic weekdays 09:00 to 18:00
time-range entry: y (empty)
time-range entry: z (active)
periodic daily 12:00 to 13:00
periodic Monday Thursday Friday 08:00 to 09:00
periodic Saturday 15:00 to Sunday 20:00
periodic daily 9:00 AM to 6:00 PM
Switch_config#
-4-
Time Range Configuration
In the first line shows “Now: Date: 2016.3.4 Time: 13:16 Day: Tuesday”, which means the date
is 4th March, 2016; the time is 13:16; the day is Tuesday.
Subsequently the screen shows the configuration and status of Time Ranges which named x, y and z
respectively. Time Range x has two items: absolute time and period, and it is in the inactive state; Time Range
y has no item and it is in the empty state; Time Range z has 4 periods and it is in active state.
1.4 Configuration Example
The following example shows how to apply a Time Range named sample to a rule of extensible IP
ACL ex.
Switch_config# time-range sample
Switch_config_tr# periodic monday 12:00 to 13:00
Switch_config_tr# exit
Switch_config# ip access-list extended ex
Switch_config_ext#
Switch_config_ext# permit ip 192.168.213.180 255.255.255.255 any time-range sample
Switch_config_extl# exit
-5-